Search
Accessible SVG Icons With Inline Sprites
7.12.2018
This is a great look at accessible SVG markup patterns by Marco Hengstenberg. Here's the ideal example:
<button type="button">
Menu
<svg class="svg-icon"
role="img"
height="10"
width="10"
viewBox="0 0 10 10"
aria-hidden="true"
focusable="false">
...
DRY State Switching With CSS Variables: Fallbacks and Invalid Values
6.12.2018
This is the second post in a two-part series that looks into the way CSS variables can be used to make the code for complex layouts and interactions less difficult to write and a lot easier to maintain. The first installment walks through various use cases where this technique applies. This post...
CSS Selectors are Conditional Statements
6.12.2018
foo {
}
Programmatically, is:
if (element has a class name of "foo") {
}
Descendent selectors are && logic and commas are ||. It just gets more complicated from there, with things like combinators and pseudo selectors. Just look at all the ways styles can cascade.
Jeremy Keith:
If...
DRY Switching with CSS Variables: The Difference of One Declaration
5.12.2018
This is the first post of a two-part series that looks into the way CSS variables can be used to make the code for complex layouts and interactions less difficult to write and a lot easier to maintain. This first installment walks through various use cases where this technique applies. The second...
Bridging the Gap Between CSS and JavaScript: CSS Modules, PostCSS and the Future of CSS
4.12.2018
In the previous post in this two-part series, we explored the CSS-in-JS landscape and, we realized not only that CSS-in-JS can produce critical styles, but also that some libraries don’t even have a runtime. We saw that user experience can significantly improve by adding clever optimizations, which...
Too Much Accessibility
3.12.2018
I like to blog little veins of thought as I see them. We recently linked to an article by Facundo Corradini calling out a tweet of ours where we used an <em> where we probably should have used an <i>.
Bruce Lawson checks if screen readers are the victims of these semantic...
New Webinar! Code+Compare React and Vue December 13
29.11.2018
We're starting up a new series of webinars that I think will be helpful for many people. Called Code+Compare, It's based on something that I do every time I think
Code Challenge #14: Test Your Knowledge of React Hooks
27.11.2018
The front-end world of JavaScript keeps buzzing daily with new tools, technologies, and super updates! One of such recent release by the React.js team is React Hooks in React 16.7-alpha. Here's
Get Viewport Lines and Columns in CodeMirror
27.11.2018
CodeMirror is an amazing utility for presenting code in a browser environment. Syntax highlighting, widgets, and a number of advanced functions make it a unique, useful tool. When using CodeMirror inside the Firefox DevTools debugger, I found that adding hundreds of column breakpoint widgets...
Three Questions to Ask of Every Bug You Encounter
19.11.2018
Bugs. Errors. Exceptions. Problems. Issues. Whatever you call them in the moment, bugs are deeply associated with failure. Specifically, our own failure to write perfect code. These “failures” can
How to Add Custom Code Snippets to Your WordPress Site
17.9.2018
If you want to extend your WordPress site with custom functionalities you frequently need to add custom code snippets to your codebase. In fact, the web is full of...
The post How to Add Custom Code Snippets to Your WordPress Site appeared first on Onextrapixel
Life’s Code: Blockchain and the Future of Genomics
3.9.2018
Sequencing the world: blockchain and the future of genomics
Build Your First Angular Website: Lazy Loading an Angular Section
30.8.2018
Next up, let's create a section of our site specifically dedicated to users. We have many users that are part of our site and we'll have two parts to this:
/users where we
Build Your First Angular Website: Routing to Two Pages
30.8.2018
Now that we have two pages, let's start routing to them. We want to be able to click around to our pages. Currently we are showing both our HomeComponent and ContactComponent
Build Your First Angular Website: Contact Form Validations
30.8.2018
We've created our contact form and are able to submit it using the processForm() method on our class:
<!-- form goes here -->
<form (ngSub
Code as a Weapon: Amir Taaki Wants You to Join the Real Crypto Revolution
8.8.2018
Infamous developer Amir Taaki believes bitcoin's potential is exhausted, but he's not giving up the fight to change the world with cryptocurrency
Stuff you can do with CSS pointer events
27.7.2018
Martijn Cuppens (the same fella with the very weird div!) has some more irresistible CSS trickery. Three of the examples are about making a child element trigger an event on a parent element (almost like the magic that is :focus-within).
Here's how I reasoned it out to myself:
You know how if...
Sometimes `sizes` is quite important.
27.7.2018
Paraphrased question from email:
I just read your article Responsive Images: If you’re just changing resolutions, use srcset. In the age of "responsive websites," srcset does not help in certain situations. For example, I have a popular products slider. On mobile, I have one image per slide where...
Did you know that style and script tags can be set to display: block?
25.7.2018
The other night, Amit Patel mentioned that you can set script tags in HTML to display: block with CSS and then edit that code inline with the contentEditable attribute. This means that you can then see it all update live in the browser as you type. Shortly after, Marius Gundersen replied that...
Adding Particle Effects to DOM Elements with Canvas
23.7.2018
Let’s take a look at how to make web pages more visually capable by combining the freedom of <canvas> with HTML elements. Specifically, we will be creating a basic HTML-to-particle effect, but the same technique could be used for many kinds of effects.
Before we begin, feel free to grab...