Search

Nalezeno "css properties": 21

Two CSS Properties for Trimming Text Box Whitespace


The text-box-trim and text-box-edge properties in CSS enable developers to trim specifiable amounts of the whitespace that appear above the first formatted line of text and below the last formatted line of text in a text box, making the text … Two CSS Properties for Trimming...

CSS content-visibility


The CSS language is full of small gaps which are frustrating to navigate. Between CSS properties to hide a container and its contents, there is still room for improvement. visibility: hidden keeps height and width integrity while display: none on a container hides everything. You can...

When to Avoid the text-decoration Shorthand Property


In my recent article about CSS underline bugs in Chrome, I discussed text-decoration-thickness and text-underline-offset, two relatively new and widely-supported CSS properties that give us more control over the styling of underlines. Let me demonstrate the usefulness of … When to Avoid...

Multi-Value CSS Properties With Optional Custom Property Values


Imagine you have an element with a multi-value CSS property, such as transform: optional custom property values: .el { transform: translate(100px) scale(1.5) skew(5deg); } Now imagine you don’t always want all the transform values to be applied, so some … Multi-Value CSS Properties With...

Is Vendor Prefixing Dead?


Let‘s take a quick stroll down memory-lane to revisit how vendor prefixing CSS properties came to be. I hope I don’t trigger PTSD for anyone! It‘s not clear who started prefixing, or when it began exactly. What is clear, is … The post Is Vendor Prefixing Dead? appeared first...

Ensuring the correct vertical position of large text


Tobi Reif notes how the position of custom fonts set at very large font sizes can be super different, even in the same browser across operating systems. The solution? Well, you know how there are certain CSS properties that only … The post Ensuring the correct vertical position of large text...

Old is Solid; New Gets Talked About


When Chris asked me to write about “one thing I learned about building websites this year” I admit my brain immediately went through a list of techniques and CSS properties I started using this year. But then I paused. Other people can write about that much better than I can....

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...

Can you get valid CSS property values from the browser?


I had someone write in with this very legit question. Lea just blogged about how you can get valid CSS properties themselves from the browser. That’s like this. CodePen Embed Fallback That gives you, for example, the fact that cursor is a thing. But then how do you know what valid values...

@property


The @property is totally new to me, but I see it’s headed to Chrome, so I suppose it’s good to know about! There is a draft spec and an “intent to ship” document. The code from that document shows: @property --my-property { syntax: "<color"; initial-value: green; ...

How to Make a CSS-Only Carousel


We mentioned a way to make a CSS-only carousel in a recent issue of the newsletter and I thought that a more detailed write up would be interesting and capture some of my thoughts on making one. So, here’s what we’re making today: There’s no JavaScript here, whatsoever! No jQuery plugins....

How to use CSS Scroll Snap


Nada Rifki demonstrates the scroll-snap-type and scroll-snap-alignCSS properties. I like that the demo shows that the items in the scrolling container can be different sizes. It is the edges of those children that matter, not some fixed snapping distance. I like Max Kohler's coverage...

How many CSS properties are there?


Tomasz Łakomy posted a joke tweet about naming all the CSS attributes and Tejas Kumar replied with a joke answer, going as far as making an npm module. You can even run a terminal command to see them: npx get-all-css-properties You'll get 259 of them. The source code uses the website quackit.com...

Show Search Button when Search Field is Non-Empty


I think the :placeholder-shown selector is tremendously cool. It allows you to select the placeholder of an input (<input placeholder="...">) when that placeholder is present. Meaning, the input does not yet have any value. You might think input[value] could do that, or help match on...

Animating with Clip-Path


clip-path is one of those CSS properties we generally know is there but might not reach for often for whatever reason. It’s a little intimidating in the sense that it feels like math class because it requires working with geometric shapes, each with different values that draw certain shapes...

SVG Properties and CSS


There are many Scalable Vector Graphics (SVG), but only certain attributes can be applied as CSS to SVG. Presentation attributes are used to style SVG elements and can be used as CSS properties. Some of these attributes are SVG-only while others are already shared in CSS, such as font-size...

8 Little Videos About the Firefox Shape Path Editor


It sometimes takes a quick 35 seconds for a concept to really sink in. Mikael Ainalem delivers that here, in the case that you haven't quite grokked the concepts behind path-based CSS properties like clip-path and shape-outside. Here are two of my favorites. The first demonstrates animating text...

Typography for Developers


This is intended as a practical guide for developers to learn web typography. We’ll cover a range of practical and useful topics, like how to choose and use custom fonts on the web, but more importantly, how to lay text out to create a pleasant user experience. We’ll go over the principles...

Diana Smith’s Top 5 CSS Properties She Uses to Produce CSS Art


Have you seen Diana Smith's CSS drawings? Stunning. These far transcend the CSS drawings that sort of crudely replicate a flat SVG scene, like I might attempt. We were lucky enough for her to post some of her CSS drawing techniques here last year. Well, Diana has also listed the top five...

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