Skip to main content
CSS-Tricks
  • Articles
  • Alamanac
  • Guides
  • Videos
  • Books
  • Newsletter
Search

Articles Tagged
trick

5 Articles
{
,

}
Direct link to the article Cool Little CSS Grid Tricks for Your Blog
grid trick

Cool Little CSS Grid Tricks for Your Blog

I discovered CSS about a decade ago while trying to modify the look of a blog I had created. Pretty soon, I was able to code cool things with more mathematical and, therefore, easier-to-understand features like transforms. However, other areas …

Avatar of Ana Tudor
Ana Tudor on Jun 9, 2020 (Updated on Jul 19, 2020)
Direct link to the article DRY State Switching With CSS Variables: Fallbacks and Invalid Values
calc css variables custom properties trick

DRY State Switching With CSS Variables: Fallbacks and Invalid Values

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 …

Avatar of Ana Tudor
Ana Tudor on Dec 6, 2018
Direct link to the article DRY Switching with CSS Variables: The Difference of One Declaration
css variables custom properties trick

DRY Switching with CSS Variables: The Difference of One Declaration

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 …

Avatar of Ana Tudor
Ana Tudor on Dec 5, 2018 (Updated on Dec 6, 2018)
Direct link to the article Making Magic with WebSockets and CSS
magic trick

Making Magic with WebSockets and CSS

Ooo. Ooo. It’s a trick, that uses CSS.…

Avatar of Chris Coyier
Chris Coyier on Jan 18, 2017
Direct link to the article Aligning Text Smartly in CSS
text-align trick

Aligning Text Smartly in CSS

One of those bonafide CSS tricks. Vijay Sharma shows it’s possible to center align a single line of text, but if it wraps, left align the text. A small adjustment, but little tricks like this can help legibility.…

Avatar of Robin Rendle
Robin Rendle on Apr 13, 2016

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways hosting
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Write for us!
  • Advertise with us
  • Contact us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • X
Back to Top