Testing React Components With Enzyme

So far in my series of posts on React development for WordPress, I’ve covered React basics, create-react-app and testing with Jest. Jest is useful for testing the rendering of React components. There are a few big buckets of functionality we have not looked at testing yet. Specifically how the internal state of stateful component changes, …
The post Testing React Components With Enzyme appeared first on Torque.
Read more

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.

Read more

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.

Read more

How to Make a Poster in PowerPoint: 10 Simple Steps

In addition to creating presentations, did you know you can use PowerPoint to design other elements such as posters? Today, we’re walking you through exactly how to make a poster in PowerPoint. While not everyone thinks about making a poster design in PowerPoint, it’s actually pretty easy—and is a viable option if you need something […]
Read more

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:

  1. A browser can’t render a page until it has built the Render Tree;
  2. the Render Tree is the combined result of the DOM and the CSSOM;
  3. the DOM is HTML plus any blocking JavaScript that needs to act upon it;
  4. the CSSOM is all CSS rules applied against the DOM;

The post CSS and Network Performance appeared first on CSS-Tricks.

Read more

How to Think like an Agency to Become a Better Developer

My company, Hallam, attended a whole company outing to the Google HQ in Dublin last year, and part of that involved a talk about the “Agency of the Future.”  The talk focused on how changes in the labor market and the evolution of technology will require the development community (and other related digital communities) need …
The post How to Think like an Agency to Become a Better Developer appeared first on Torque.
Read more

Deadline to Enter Automattic Design Awards Ends Friday

At WordCamp Europe this year, Automattician John Maeda, shared his idea for the Automattic Design Awards. The crowd cheered and thus the idea was born. Maeda teamed up with Simon Cooke from Pragmatic shortly to create a way to recognize amazing designs made with WordPress. Maeda and Cooke gathered a jury of digital agency and design …
The post Deadline to Enter Automattic Design Awards Ends Friday appeared first on Torque.
Read more

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.

Read more

20+ Best Cool PowerPoint Templates

PowerPoint slideshows used to be the boring part of a meeting or presentation. But now, with the help of cool PowerPoint templates, everyone can make presentation slideshows look more interesting and attractive, even if you don’t have any experience in PowerPoint slideshow design. For this collection, we gathered some modern and stylish PowerPoint presentation templates […]
Read more