However, I think the author's jabs at CSS pre-processors and their adherents are unsubstantiated and a little unfair. I don't see how using SASS precludes you from knowing about or using complex selectors. As the author points out, SASS is merely an efficient and more intuitive way to write classic CSS. The good parts of CSS are still the good parts of SASS, and by definition every feature of CSS is a feature of SASS. It doesn't really follow that using SASS predisposes you to be less knowledgeable about regular CSS.
If anything, people using SASS likely use many more complex styles and work on larger projects, and are probably know more about and actively use more aspects of CSS than do people who don't have a need for SASS.
AskHN: is there a good online resource that actually explains the layout mechanics of the modern browser? Not a comprehensive CSS reference (there're lots of them) but fundamental principles? lmgtfy's welcome.
> Did you think I was actually going to recreate Tetris in CSS? Sorry, no. Nobody needs to do that.
I mean that stuff is usually pretty awesome, but we've had more than enough playful experiements and this was far more valuable and the title is imo a disservice to this.
Though know that i think of it, i think he ended up using JS for this :/
[0] https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/:last-child
li:nth-child(3n + 1):last-child {
float: none;
width: auto;
}
li:nth-child(3n + 2):last-child {
width: 66.666%;
}Same with COffeeScript... let's get real, pre-processing is great and all but there are tons of scenarios where it's not worth it just to get around writing extra sets of brackets or duplicating a bit of CSS.
Surely there are logic-intensive places where it is a huge boon but then I'm surprised I don't see more people advocating the absolute need for something like Dart rather than pre-processors.
Anyway, I feel like when you go to corporate work they want you to know atomic level ("how do various browsers interpret this bit of css") whereas its the smaller companies who want to know how many lines of code you saved by using syntactic sugar ("do you use LESS or SASS?"). They're way impressed if you use it even if it's just saving you 10 lines of code per project... Just an observation about pre-processing / interviewing / code hipsterdom. :D
And please, can we drop the "hipster" meme around new languages/tools? People experiment and adopt promising new technologies because they see a benefit to using them.
Eh, trust me I do miss it because I love open source and I think it's more fun to choose your own libraries/frameworks, but man do the interviews get annoying... I found tons of average pay junior level jobs in RoR that really gave me a hard time in interviews for not knowing yet another Backbone-esque js library & they act like it requires such high intellect that letting me learn on the job would be a gamble or something. When I switched to the Java world I got picked up at higher pay with a no-hassle interview just based on my GPA & prior achievements (I have a master's degree in audio signal processing -- & yes, RoR'ers still often could not take it on faith that I would be able to comprehend their js preferences).
Bottom line is there are powerful tools in both camps (corporate tools v. open source) but I found that open source interviewers reaaaaally needle you even though they have less $$ to offer. And in the end they won't invest in talent, they all seem to just be looking for a senior dev who is down on his luck.
Can't say I wouldn't work at an open source shop if it wasn't the right fit, just saying it can be a bit more hostile than advertised. Those folks are very picky and often looking for a golden goose at entry level salary.
Anyway, just my limited experiences. I believe coding and work should be fun, but I'm pretty sure we need to set our sights on a real white whale instead of all these BS semantics.
I'd like to know how one maintains a huge modular css code base without any sort of preprocessor.
Preprocessors are here because CSS sucks, and no standard committee seems to want to fix it. That's why people built these tools right, to solve a problem nobody was going to solve for them.
That's exactly the same thing with javascript. If javascript was decent we would not need all these compile to javascript languages.
These tools bring diversity and choice to a poor plateform with shamefull languages that are not evolving very fast. You cant fix it just by adding features without fixing the core. that's what preprocessors are for and it's ok to abuse them without shame.
EDIT:
my point is "it's good enough" isnt good enough, in a time where we are supposed to maintain complex front-end projects and asset pipelines, that work on different devices that have their own idea of how to implement (poorly written) standards.
The problem with CSS preprocessors is that they are simultaneously too powerful and not powerful enough. That is, things like SASS mixins and nesting make it easy to make mistakes (specificity overload and huge stylesheets are the two big ones). At the same time they don't change runtime semantics so you can't fix the biggest problems in CSS like specificity wars, finding dead selectors and namespacing.
I do like variables and expressions though (mainly for colors and grid units).
The way you maintain a big modular codebase is to make your stylesheets really stupid and build the smarts into whatever is generating the DOM. The tools we have for generating DOM are both far more mature and we have more control over the semantics of the runtime.
His mention of separation of concerns is, IMO a common misunderstanding of what that term means. The coupling has to be made somewhere after all and it's better to choose the more performant and more explicit way.
What a major let down :(
I fix the font size and font in Firefox and state a preference in Chrome (seems to get overridden). I have a default zoom of 125% for Chrome, but it's starting to look like I can ditch that soon, as author's are changing their designs.
Sometimes resizing the window can lead to something more pleasing (font sizes can also change depending on the window size.) Resizing the browser doesn't play that well with tabs - resize one and you resize them all.
"You can please some of the people some of the time all of the people some of the time some of the people all of the time but you can never please all of the people all of the time." ― Abraham Lincoln
In general though responsive sites are better for me.