Search

Nalezeno "LINE": 603

Using Flexbox and text ellipsis together


You can truncate a single line of text with an ellipsis (…) fairly easily with text-overflow and a few friends. But, as you might expect, that truncation happens at the end of the line of text. What if you want to truncate content in the middle? Leonardo Faria details good use cases for this...

Backdrop Filter effect with CSS


I love these little posts where some tricky-looking design is solved by a single line of CSS using a little-known property. In this case, the design is a frosted glass effect and the CSS property is backdrop-filter. The approach? Easy peasy: .container { backdrop-filter: blur(10px); } The...

Collective #613


1-Line Layouts * Accordion Rows in CSS Grid * viewBox Newsletter * Knopf.css * WordPress Static Site The post Collective #613 appeared first on Codrops

When a Line Doesn’t Break


We expect a line to break when the text on that line reaches the parent box boundaries. We see this every time we create a paragraph, just like this one. When the parent box doesn’t have enough room for the next word in a line, it breaks it and moves down to the next line and repeats that...

Responsive Styling Using Attribute Selectors


One of the challenges we face when implementing class-based atomic styling is that it often depends on a specific breakpoint for context. <div class="span-12"</div<!-- we want this for small screens  --<div class="span-6"</div<!-- we want this for medium screens --<div...

Line-Animated Hamburger Menu


This kind of SVG + CSS animation trickery is catnip to me. Mikael Ainalem shares how to draw a hamburger icon (the “three lines” thing you’re well familiar with), but then animate it in a way that is surprising and fun by controlling the SVG properties in CSS. CodePen Embed...

The Mad Magazine Fold-In Effect in CSS


This was always my favorite thing in Mad magazine. One page (the inside of the back cover, I think) was covered in a zany illustration. You folded that page in thirds, covering up the middle-third of that image, and a new image would form because the illustration was designed to perfectly line...

Hide Scrollbars During an Animation


CSS still can’t animate to auto dimensions. .dropdown { transition: 0.2s; height: 0; } .dropdown.open { /* the height will change, but it won't animate. */ height: auto; } There is JavaScript trickery you can try. Brandon Smith outlined several techniques here a little while back....

WebP Image Support Coming to iOS 14


Apple announced a ton of new updates at yesterday’s WWDC20 keynote address, from new hardware to updated applications. There’s lots to gawk at and enough device-envy to go around. But there’s one little line in the Safari 14 Beta release notes that caught my eye: Added WebP image...

LingoJam


I’ll sometimes search the web for something like “Small Text Generator” knowing there will be some website that will turn some dumb thing I want to type like: Uhm hi when is that meeting again? into something fun like… ᵁʰᵐ ʰᶦ ʷʰᵉⁿ ᶦˢ ᵗʰᵃᵗ ᵐᵉᵉᵗᶦⁿᵍ ᵃᵍᵃᶦⁿˀ Important note about...

On Adding IDs to Headers


Here’s a two-second review. If an element has an ID, you can link to it with natural browser behavior. It’s great if headings have them, because it’s often useful to link directly to a specific section of content. <h3 id="step-2"Step 2</a Should I be so inclined, I could...

How to Reverse CSS Custom Counters


I needed a numbered list of blog posts to be listed with the last/high first and going down from there. Like this: 5. Post Title 4. Post Title 3. Post Title 2. Post Title 1. Post Title But the above is just text. I wanted to do this with a semantic <ol> element. The easy way This can...

The Trickery it Takes to Create eBook-Like Text Columns


There’s some interesting CSS trickery in Jason Pamental’s latest Web Fonts & Typography News. Jason wanted to bring swipeable columns to his digital book experience on mobile. Which brings up an interesting question right away… how do you set full-width columns that...

How to Get All Custom Properties on a Page in JavaScript


We can use JavaScript to get the value of a CSS custom property. Robin wrote up a detailed explanation about this in Get a CSS Custom Property Value with JavaScript. To review, let’s say we’ve declared a single custom property on the HTML element: html {   --color-accent: #00eb9b; } In JavaScript...

Adding CSS to a Page via HTTP Headers


Only Firefox supports it, but if you return a request with a header like this: Header add Link "<style.css;rel=stylesheet;media=all" …that will link to that stylesheet without you having to do it in the HTML. Louis Lazaris digs into it: […] the only thing I can think of that could...

Global CSS options with custom properties


With a preprocessor, like Sass, building a logical “do this or don’t” setting is fairly straightforward: $option: false; @mixin doThing { @if $option { do-thing: yep; } } .el { @include doThing; } Can we do that in native CSS with custom properties? Mark Otto shows...

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