Demystifying TypeScript Discriminated Unions

TypeScript is a wonderful tool for writing JavaScript that scales. It’s more or less the de facto standard for the web when it comes to large JavaScript projects. As outstanding as it is, there are some tricky pieces for the …

Demystifying TypeScript Discriminated Unions originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/typescript-discriminated-unions/

3y | CSS tricks
How to Cycle Through Classes on an HTML Element

Say you have three HTML classes, and a DOM element should only have one of them at a time:

https://css-tricks.com/cycle-through-classes-html-element/

3y | CSS tricks
Fancy CSS Borders Using Masks

Have you ever tried to make CSS borders in a repeating zig-zag pattern? Like where a colored section of a website ends and another differently colored section begins — not with a straight line, but angled zig zags, rounded humps, …

Fancy CSS Borders Using Masks originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/css-borders-using-masks/

3y | CSS tricks
How Do You Handle Component Spacing in a Design System?

Say you’ve got a component. It’s highly likely it shouldn’t be butted right up against any other components with no spacing around it. That’s true for… pretty much every component. So, how do you handle component spacing in …

How Do You Handle Component Spacing in a Design System? originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/component-spacing-design-system/

3y | CSS tricks
How to Make a Scroll-Triggered Animation With Basic JavaScript

A little bit of animation on a site can add some flair, impress users, and get their attention. You could have them run, no matter where they are on the page, immediately when the page loads. But what if your …

How to Make a Scroll-Triggered Animation With Basic JavaScript originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/scroll-triggered-animation-vanilla-javascript/

3y | CSS tricks
Why Don’t Developers Take Accessibility Seriously?

You know that joke, “Two front-end developers walk into a bar and find they have nothing in common”? It’s funny, yet frustrating, because it’s true. This article will present three different perspectives on accessibility in web design and development. Three …

Why Don’t Developers Take Accessibility Seriously? originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/why-dont-developers-take-accessibility-seriously/

3y | CSS tricks
Using SVG in WordPress (2 Helpful Plugin Recommendations)

SVG is a great image format, so it's nice to able to use it in WordPress. If you're looking to be using SVG in WordPress. , we've got you covered here with all the best options.

Using SVG in WordPress (2 Helpful Plugin Recommendations) originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/using-svg-in-wordpress/

3y | CSS tricks
Context-Aware Web Components Are Easier Than You Think

Another aspect of web components that we haven’t talked about yet is that a JavaScript function is called whenever a web component is added or removed from a page. These lifecycle callbacks can be used for many things, including making …

Context-Aware Web Components Are Easier Than You Think originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/context-aware-web-components/

3y | CSS tricks
How the Heck Do You Install an Existing npm Project?

(This is a sponsored post.) We’ve gotten a good overview of how npm works and how to use it to install packages and run commands at this point. Now let’s go a little further and see what it looks …

How the Heck Do You Install an Existing npm Project? originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/how-to-install-an-npm-project/

3y | CSS tricks
What the Heck Are npm Commands?

npm is, as you now know, a package manager. But like similar, earlier tools that run tasks in the command line, such as Grunt and Gulp, npm can also run tasks—which is perfect for us because now that …

What the Heck Are npm Commands? originally published on CSS-Tricks. You should get the newsletter and become a supporter.

https://css-tricks.com/what-the-heck-are-npm-commands/

3y | CSS tricks

Căutare