Trishthedish / DuwamishApp

Dynamic website aimed at bringing awareness around Duwamish tribes potential extinction.
3 stars 5 forks source link

namespace css #75

Closed AndyCErnst closed 8 years ago

brayzen commented 8 years ago

I'll get to this once it finally works....I'm finding that LESS is very specific, more so than SASS ? Specific as in.....you can't jump an child nodes, you have to step down each child to its child

AndyCErnst commented 8 years ago

I'm not certain what you mean. Less allows you to turn this: .a { } .a:hover { } .a .b .c { } into this: .a { &:hover { } .b .c { } } It also gives you variables and mixins. I have an example of each in my stuff, but really it's the nesting and variables I use the most.

Maybe you are noticing the id selectors I wrap each file in? That allows us to namespace css that's specific for each page. It makes it far easier to reason about what the css rule affects. I name spaced the slider css as well without changing the ids in all the html, but that's because I thought Ivan would have his html partials thing in and we could keep only one copy of the slider html.