Using the `outline` Property as a Collapsable Border

The outline property in CSS draws a line around the outside of an element. This is quite similar to the border property, the main exception being that outline isn’t a part of the box model. It is often used for …

The post Using the outline Property as a Collapsable Border appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/using-the-outline-property-as-a-collapsable-border/

4y | CSS tricks
Links on Typography

I studied the fonts of the top 1000 websites. Here’s what I learned. — Michael Li brings the data. San-serif has total dominance. “[…] it is rare to go below 10px or above 24px.” And poor always being the … The post Links on Typography appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter. https://css-tricks.com/links-on-typography-2/

4y | CSS tricks
Perfect Tooltips With CSS Clipping and Masking

Clipping and masking have been around for a while now in CSS and even have pretty decent browser support. I recently worked on a project that needed to use a clipping technique for tooltips showing above links in text. Those …

The post Perfect Tooltips With CSS Clipping and Masking appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/perfect-tooltips-with-css-clipping-and-masking/

4y | CSS tricks
Start Serving Optimized Images in Vue

Images have become extremely important to the effectiveness of websites. They speak a 1000 words, attract attention, and stimulate emotions. However, web performance is also a growing problem for most websites. And images are at the heart of many web …

The post Start Serving Optimized Images in Vue appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/start-serving-optimized-images-in-vue/

4y | CSS tricks
Inline Styles as Classes (lol)

If you’re abhorred by using inline styles, just move that style to the class attribute! And then make sure you have CSS in place that, ya know, does what it says on the box.

I've revolutionized CSS. pic.twitter.com/1AWCldyCwP — Sam …

The post Inline Styles as Classes (lol) appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/inline-styles-as-classes-lol/

4y | CSS tricks
Useful and Useless Code Comments

Jim Nielsen:

If somebody says a comment isn’t adding any value, I would ask: to whom? Personally, I’ve never liked the advice that writing obvious comments is bad practice—probably because I write obvious comments all the time.

Jim showed …

The post Useful and Useless Code Comments appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://blog.jim-nielsen.com/2021/useful-and-usless-code-comments/

4y | CSS tricks
How I Used the WAAPI to Build an Animation Library

The Web Animations API lets us construct animations and control their playback with JavaScript. The API opens the browser’s animation engine to developers and was designed to underlie implementations of both CSS animations and transitions, leaving the door open to …

The post How I Used the WAAPI to Build an Animation Library appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/how-i-used-the-waapi-to-build-an-animation-library/

4y | CSS tricks
Detect Unused Classes in… HTML

Usually, when “unused” comes up in conversation regarding CSS, it’s about removing chunks of CSS that are not used in your site or, at least, the styles not currently in use on a specific page. The minimal amount of CSS …

The post Detect Unused Classes in… HTML appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/detect-unused-classes-in-html/

4y | CSS tricks
Media Queries in Times of @container

Max Böck took me up on my challenge to look through a codebase and see how many of the @media queries could ultimately become @container queries.

I took the bait and had a look at some of my projects –

The post Media Queries in Times of @container appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://mxb.dev/blog/media-queries-in-times-of-container-queries/

4y | CSS tricks
Just How Niche is Headless WordPress?

I wonder where headless WordPress will land. And by “headless” I mean only using the WordPress admin and building out the user-facing site through the WordPress REST API rather than the traditional WordPress theme structure. Is it… big? The future …

The post Just How Niche is Headless WordPress? appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.

https://css-tricks.com/just-how-niche-is-headless-wordpress/

4y | CSS tricks

Ricerca