Search

Nalezeno "css variables": 36

CSS Functions and Mixins Module Notes


Most days, I’m writing vanilla CSS. Thanks to CSS variables and nesting, I have fewer reasons to reach for Sass or any other preprocessor. The times I reach for Sass tend to be when I need a @mixin to loop … CSS Functions and Mixins Module Notes originally published on CSS-Tricks...

State of CSS 2022 Survey Now Open


The State of CSS survey recently opened up. Last year, the survey confirmed everyone’s assumptions that TailwindCSS is super popular and CSS variables are mainstream. It also codified what many of us want from CSS, from Container Queries to … State of CSS 2022 Survey Now Open...

Interpolating Numeric CSS Variables


We can make variables in CSS pretty easily: :root { --scale: 1; } And we can declare them on any element: .thing { transform: scale(--scale); } Even better for an example like this is applying the variable on a user … Interpolating Numeric CSS Variables originally published...

Quick and Dirty Bootstrap Overrides at Runtime


Oh, Bootstrap, that old standard web library that either you hate or you spend all your time defending as “it’s fine, it’s not that bad.” Regardless of what side you fall on, it’s a powerful UI framework that’s everywhere, … The post Quick and Dirty Bootstrap Overrides at Runtime appeared...

Using Absolute Value, Sign, Rounding and Modulo in CSS Today


For quite a while now, the CSS spec has included a lot of really useful mathematical functions, such as trigonometric functions (sin(), cos(), tan(), asin(), acos(), atan(), atan2()), exponential functions (… The post Using Absolute Value, Sign, Rounding and Modulo in CSS Today appeared...

A Complete Guide to Custom Properties


Everything important and useful to know about CSS Custom Properties. Like that they are often referred to as "CSS Variables" but that's not their real name. The post A Complete Guide to Custom Properties appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter

Want to Write a Hover Effect With Inline CSS? Use CSS Variables.


The other day I was working on a blog where each post has a custom color attached to it for a little dose of personality. The author gets to pick that color in the CMS when they’re writing the post. … The post Want to Write a Hover Effect With Inline CSS? Use CSS Variables. appeared first...

Use CSS Variables instead of React Context


Turns out you can use several different libraries to pass color information around components. Or, you could use custom properties, built right into CSS, have no decline in your own developer experience, and deliver a faster experience to your users. … The post Use CSS Variables instead...

The CSS Custom Property Toggle Trick


Back in July 2020, I got an email from James0x57 (I always try to refer to people by their name, but I think I get the sense they prefer to go by screen name) that says: The entire world of branching conditional logic and bulk feature toggling for custom CSS properties is possible and only exists...

Collective #626


With Code * CSS Grid full-bleed layout tutorial * Why Tailwind CSS * CSS Variables 101 The post Collective #626 appeared first on Codrops

The Cicada Principle, revisited with CSS variables


Lea Verou digging up the CSS trickery classic and applying it to clip the backgrounds of some code blocks: The main idea is simple: You write your main rule using CSS variables, and then use :nth-of-*() rules to set these variables to something different every N items. If you use enough...

Global and Component Style Settings with CSS Variables


The title of this Sara Soueidan article speaks to me. I’m a big fan of the idea that some CSS is best applied globally, and some CSS is best applied scoped to a component. I’m less interested in how that is done and more interested in just seeing that conceptual approach used in some...

When Sass and New CSS Features Collide


Recently, CSS has added a lot of new cool features such as custom properties and new functions. While these things can make our lives a lot easier, they can also end up interacting with preprocessors, like Sass, in funny ways. So this is going to be a post about the issues I’ve encountered...

Collective #608


ScrollTrigger * A user’s guide to CSS variables * Twin * CUBE CSS * Consoleimg * Colors in CSS The post Collective #608 appeared first on Codrops

How to Make a Line Chart With CSS


Line,  bar, and pie charts are the bread and butter of dashboards and are the basic components of any data visualization toolkit. Sure, you can use SVG or a JavaScript chart library like Chart.js or a complex tool like D3 to create those charts, but what if you don't want to load yet another...

Use and Reuse Everything in SVG… Even Animations!


If you are familiar with SVG and CSS animations and started to work with them often, here are some ideas you might want to keep in mind before jumping into the job. This article will be about learning how to build and optimize your code with <use> element, CSS Variables and...

Multi-Thumb Sliders: General Case


The first part of this two-part series detailed how we can get a two-thumb slider. Now we'll look at a general multi-thumb case, but with a different and better technique for creating the fills in between the thumbs. And finally, we'll dive into the how behind the styling a realistic 3D-looking...

Multi-Thumb Sliders: Particular Two-Thumb Case


This is a concept I first came across a few years back when Lea Verou wrote an article on it. Multi-range sliders have sadly been removed from the spec since, but something else that has happened in the meanwhile is that CSS got better — and so have I, so I recently decided to make my...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace