Earlier quoted context omitted.
> If everything in your code is a React component, I get why you would just want to write the styles right there. Even for keeping the style close to the component, you can just use standard css. Create a folder Button, create two files Button.tsx and Button.css in that folder, import the css file in the tsx file, add a class "button" on the first element the tsx file renders, start all the rules in the css file with…
if you're not using CSS modules, why would you import the css file into your javascript? But anyway, I think we agree. Feel free to read the linked blog post ;-)
Modern CSS Code Snippets: Stop writing CSS like it's 2015
291–300 of 318 posts
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#292Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#293Earlier quoted context omitted.
Mvc is why there's 3 languages: HTML CSS and JavaScript The separation is already there People have just failed to understand it
> The separation is already there I wonder how you would map these three onto M, V, and C :-)
Out of those multi-year-long working groups came cascading style sheets and their revisions along with JavaScript features like dom access.
The dominant paradigm is to let their work go unread and call it a flex.
I've frequently been belittled and mocked in online negging when I encourage people to take a deep dive and learn something new.
I'm not here to debate people who think mockery and dunking on people that have done hard work is good faith behavior
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#294Earlier quoted context omitted.
> we wouldn't have to adjust our HTML when we change the layout. You don't have to: https://csszengarden.com/
CSS Zen Garden is quite the opposite of a good example of your point. Even small changes to the original page layout would completely break most of the provided styles. If I removed the .page-wrapper class it would be also nearly impossible for a different developer to reverse-engineer the issue from the existing Template and CSS files.
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#295Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#296Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#297Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#298Earlier quoted context omitted.
"widely available" has a precise meaning that includes Firefox (both desktop and Android). it might be irrelevant for some, but let's not twist industry definitions
Based on marketshare, Firefox can easily be excluded from "widely available"
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#299Earlier quoted context omitted.
Wait until sites start rendering to canvas. You will yearn for the days of div soup.
why should they? this has been a worry for some time, but I don't see it happening
Re: Modern CSS Code Snippets: Stop writing CSS like it's 2015
#300Earlier quoted context omitted.
As much hate as it gets, this is one thing I like about Angular.
imo Angular would have won had it figured out a stronger path from v1 to v2