Testing React Components With Enzyme
The post Testing React Components With Enzyme appeared first on Torque.
Keyboard-Only Focus Styles
Like Eric Bailey says, if it’s interactive, it needs a focus style. Perhaps your best bet? Don’t remove the dang outlines that focusable elements have by default. If you’re going to rock a button { outline: 0; }, for example, then you’d better do a button:focus { /* something else very obvious visually */ }. I handled a ticket just today where a missing focus style was harming a user who relies on visual focus styles to …
The post Keyboard-Only Focus Styles appeared first on CSS-Tricks.
Dark modes with CSS
With the introduction of dark mode in macOS, Safari Technology Preview 68 has released a new feature called prefers-color-scheme which lets us detect whether the user has dark mode enabled with a media query.
That’s right. If this becomes a little bit more supported in other browsers, then we might potentially soon have a way to toggle on night modes with a few lines of CSS!
Recently Mark Otto described how we can start using prefers-color-scheme today in order …
The post Dark modes with CSS appeared first on CSS-Tricks.
How to Make a Poster in PowerPoint: 10 Simple Steps
Google Developers Demo AMP Stories Integration with Gutenberg at Chrome Dev Summit
CSS and Network Performance
JavaScript and images tend to get the bulk of the blame for slow websites, but Harry explains very clearly why CSS is equally to blame and harder to deal with:
- A browser can’t render a page until it has built the Render Tree;
- the Render Tree is the combined result of the DOM and the CSSOM;
- the DOM is HTML plus any blocking JavaScript that needs to act upon it;
- the CSSOM is all CSS rules applied against the DOM;
…
The post CSS and Network Performance appeared first on CSS-Tricks.
How to Think like an Agency to Become a Better Developer
The post How to Think like an Agency to Become a Better Developer appeared first on Torque.
Deadline to Enter Automattic Design Awards Ends Friday
The post Deadline to Enter Automattic Design Awards Ends Friday appeared first on Torque.
The “C” in CSS: The Cascade
Following up from Geoff’s intro article on The Second “S” in CSS, let’s now move the spotlight to the “C” in CSS — what we call the Cascade. It’s where things start to get messy, and even confusing at times.
Have you ever written a CSS property and the value doesn’t seem to work? Maybe you had to turn to using !important to get it going. Or perhaps you resorted to writing the CSS inline on the element …
The post The “C” in CSS: The Cascade appeared first on CSS-Tricks.




