Live data from Hacker News

Writing CSS Algorithms

notlaura.com

11–20 of 39 posts

Re: Writing CSS Algorithms

#11
post #3

Whats a good place to learn CSS for someone with programming experience? I've been in my low-level C++ world for a long time and am pretty out of touch with GUI/Web things. I was writing some JavaFX code and saw it can be extended with CSS, but I don't know where to start. I'd also like to tweak the CSS on my webpage, but also don't know what's what. What I've found online is targeted towards people starting out codi…

I've got two nice books.

https://www.packtpub.com/web-development/professional-css3

https://www.packtpub.com/web-development/responsive-web-desi...

Re: Writing CSS Algorithms

#12
post #8

“Make CSS interesting/here’s a methodology blah blah”.... Sets up SCSS. Can we just agree that current CSS is a mistake and bring more of SCSS into it?

Athough I think CSS could be more than it is, I have never felt any need to use SCSS. Writing a complete new style for a typical blog costs me half a day with clever use of nesting, css variables and such.

The pain points usually stem from inconsistencies in browser implementations. Except for missing functionality like not beeing able to select a element who has no child of a given type I never really felt that it took longer than it had to (most of my time goes into deciding the design and not into wrangling with fine details of css).

But maybe I should check out SCSS?

Re: Writing CSS Algorithms

#13
post #3

Whats a good place to learn CSS for someone with programming experience? I've been in my low-level C++ world for a long time and am pretty out of touch with GUI/Web things. I was writing some JavaFX code and saw it can be extended with CSS, but I don't know where to start. I'd also like to tweak the CSS on my webpage, but also don't know what's what. What I've found online is targeted towards people starting out codi…

I'm sure you'll get over the basics pretty quick. After that, check this out http://learnlayout.com/.

Re: Writing CSS Algorithms

#14
post #12
post #8

“Make CSS interesting/here’s a methodology blah blah”.... Sets up SCSS. Can we just agree that current CSS is a mistake and bring more of SCSS into it?

Athough I think CSS could be more than it is, I have never felt any need to use SCSS. Writing a complete new style for a typical blog costs me half a day with clever use of nesting, css variables and such. The pain points usually stem from inconsistencies in browser implementations. Except for missing functionality like not beeing able to select a element who has no child of a given type I never really felt that it t…

> with clever use of nesting

I don't think CSS Nesting Level 3 is implemented anywhere (it only really got added last year [1]). And there are still ongoing discussions around it (e.g. media-queries [2]).

> But maybe I should check out SCSS?

Definitely, yes. There are quite a few things that would be wonderful to see in CSS:

- better, less verbose syntax for variables

- mixins and extends

- nesting

... I forget what else, as I haven't done frontend work in a while :)

[1] https://github.com/w3c/csswg-drafts/issues/2701#issuecomment...

[2] https://github.com/tabatkins/specs/issues/56

Re: Writing CSS Algorithms

#15
Why does sass have to be ‘compiled’ in 2019? It’s not like some heavy duty compilation is being performed. It should be as standard and supported as css.

Re: Writing CSS Algorithms

#17
post #9
post #3

Whats a good place to learn CSS for someone with programming experience? I've been in my low-level C++ world for a long time and am pretty out of touch with GUI/Web things. I was writing some JavaFX code and saw it can be extended with CSS, but I don't know where to start. I'd also like to tweak the CSS on my webpage, but also don't know what's what. What I've found online is targeted towards people starting out codi…

+1 to HillRat's answer (especially hacking around in Codepen). On top of his, I want to plug the Mozilla Web Docs [0]. They're absolutely wonderful to reference for all your CSS needs, especially if you learn well from reading the docs. On top of that, they have excellent tutorials as well. I would consider checking out their one on CSS [1], you might find it easier to get through than an O'Reilly book. A little unre…

These are great. Thanks for the breakdown - the whole webdev space has so much jargon that I probably should take the time to learn a bit of everything through the Mozilla tutorials and then pick up that book once I want some more

Re: Writing CSS Algorithms

#18
post #7
post #6

Algorithm? I see a design process but using the word algorithm to describe a CSS layout is a bit baffling to me. It's like creating a library of json snippets and calling it a json algorithm.

Should have seen it coming after “object oriented CSS”, “functional CSS” and “immutable CSS”, none of which has anything to do with OOP or FP. What’s next? CSS data structures?

While these are really just boilerplate snippets for some common layouts, you can easily have an actual algorithm for CSS, too. For instance complex recipes/tricks for selecting just some of the nodes using different combinations of n-th child and sibling selectors are definitely algorithms, offering very generalized list of steps to follow to implement the logic on any number of elements.

Re: Writing CSS Algorithms

#19
post #15

Why does sass have to be ‘compiled’ in 2019? It’s not like some heavy duty compilation is being performed. It should be as standard and supported as css.

downvoted, because..?

I stand by my statement. JavaScript has progressed, and styling should too.

Re: Writing CSS Algorithms

#20
post #3

Whats a good place to learn CSS for someone with programming experience? I've been in my low-level C++ world for a long time and am pretty out of touch with GUI/Web things. I was writing some JavaFX code and saw it can be extended with CSS, but I don't know where to start. I'd also like to tweak the CSS on my webpage, but also don't know what's what. What I've found online is targeted towards people starting out codi…

Don't waste your time... use clever css frameworks and solve the problem on spot... doesn't matter how nice your css code, your colleagues will mess it up quickly... let the intern fix it. ;)
Post reply on HN