developer

Using fonts with Rails asset pipeline

Question: ❓❓❓ I have some fonts being configured in my Scss file like so: @font-face { font-family: 'Icomoon'; src: asset-url('icoMoon.eot?#iefix', font) format('embedded-opentype'), asset-url('icoMoon.woff', font) format('woff'), asset-url('icoMoon.ttf', font) format('truetype'), asset-url('icoMoon.svg#Icomoon', font) format('svg'); } The actual font file are stored in /app/assets/fonts/ I have added config.assets.paths << Rails.root.join("app", "assets", "fonts") to my Read more…

By admin, ago
developer

Import regular CSS file in SCSS file?

Question: ❓❓❓ Is there anyway to import a regular CSS file with Sass’s @import command? While I’m not using all of the SCSS syntax from sass, I do still enjoy it’s combining/compressing features, and would like to be able to use it without renaming all of my files to *.scss Read more…

By admin, ago
developer

Sass Variable in CSS calc() function

Question: ❓❓❓ I’m trying to use the calc() function in a Sass stylesheet, but I’m having some issues. Here’s my code: $body_padding: 50px body padding-top: $body_padding height: calc(100% - $body_padding) If I use the literal 50px instead of my body_padding variable, I get exactly what I want. However, when I Read more…

By admin, ago
developer

What’s the difference between SCSS and Sass?

Question: ❓❓❓ From what I’ve been reading, Sass is a language that makes CSS more powerful with variable and math support. What’s the difference with SCSS? Is it supposed to be the same language? Similar? Different? Good Answer: 👌👌👌 Sass is a CSS pre-processor with syntax advancements. Style sheets in Read more…

By admin, ago