Search

Nalezeno "LiNK": 1156

CSS :nth-of-class selector


That's not a thing. But it kinda is! Bram covers how frustrating .bar:nth-child(2) is. It's not "select the second element of class .bar." It's "select the second element if it also has the class .bar." The good news? There is a real selector that does the former: :nth-child(2 of .bar) { } Safari...

CSS Can Influence Screenreaders


Ben Myers covers some clear examples of where CSS totally changes what some screen readers announce. For example, some screenreader will see text-transform: uppercase; on a button label that says "Add" and read it like an abbreviation, "A.D.D." These cases of CSS messing with our screenreader...

Flexible Repeating SVG Masks


Tyler Gaw reminds us that mask-image can repeat, resize, and move just like background-image does, which is fun to combine and play with. I could see it being a fun option for an <hr, like Sara is doing. CodePen Embed Fallback Direct Link to Article — Permalink… Read article...

Client-Side Image Editing on Mobile


Michael Scharnagl: Ever wanted to easily convert an image to a grayscale image on your phone? I do sometimes, and that's why I build a demo using the Web Share Target API to achieve exactly that. For this I used the Service Worker way to handle the data. Once the data is received on the client,...

CSS2JS


To add inline styles on an element in JSX, you have to do it in this object syntax, like: <div style={{ fontSize: 16, marginBottom: "1rem" }}Content </div That might look a little weird to us folks who are so used to the CSS syntax, where it is font-size (not fontSize), margin-bottom...

Flexbox and absolute positioning


Chen Hui Jing notes that when you absolutely position a flex item, it's no longer part of the flex layout. Except... it kinda is a little bit. If you make the child position: absolute; but don't apply any top/right/bottom/left properties, then flexbox alignment will still apply to it. It's odd...

Ideas for Distorted Link Effects on Menus


Some examples of how to use decorative distortion effects on big typography menu links. Ideas for Distorted Link Effects on Menus was written by Mary Lou and published on Codrops

15 Things to Improve Your Website Accessibility


This is a really great list from Bruce. There is a lot of directly actionable stuff here. Send it around to your team and make it something that you all go through together. Here's a little one that prodded me to finally fix... Most screen readers allow the user to quickly see a list of links...

CSS X


My name appears in an article from Bert Bos (co-author of the original CSS spec), so I'll consider that a life accomplishment. Berts makes the point that CSS has evolved and the working group versions things, but the working group hasn't been and doesn't really plan to be involved in these...

Stop Using “Dropdown”


Adrian Roselli notes that it might actually mean: A <select> menu An ARIA Listbox, Combobox, Menu, or Disclosure Widget An input with a <datalist> An input with autocomplete A <details><summary> block An accordion Flyout navigation In my own usage, I tend to mean...

Using the HTML title attribute


 Steve Faulkner: User groups not well served by use of the title attribute • Mobile phone users.• Keyboard only users.• Screen magnifier users.• Screen reader users.• Users with fine motor skill impairments.• Users with cognitive impairments. Sounds like in 2020, the only useful thing the title...

The CSS Podcast


From Adam and Una at Google, a podcast just about CSS. I believe I'm contractually obliged to link to that! Just one episode out so far, a shorty about the box model. Last time I wrote up podcasts I like was 8 years ago most of them are dead now, except the biggies like This American Life and...

“weeds of specificity”


Lara Schenck: [...] with WordPress child themes, you are all but guaranteed to get into the weeds of specificity, hunting around theme stylesheets that you didn’t author, trying to figure out what existing declaration is preventing you from applying a new style, and then figuring out the least...

A Guide to Handling Browser Events


In this post, Sarah Chima walks us through how we can work with browser events, such as clicking, using JavaScript. There’s a ton of great info in here! If JavaScript isn’t your strong suit, I think this is the best explanation of event handling that I’ve read in quite some time. When an event...

Two Steps Forward, One Step Back


Brent Jackson says CSS utility libraries failed somewhat: Eventually, you'll need to add one-off styles that just aren't covered by the library you're using, and there isn't always a clear way to extend what you're working with. Without a clear way to handle things like this, developers tend...

Careful with Nested `display: grid; height: 100%;`


It's not every day you can feel CSS be slow at something. Reddit user jgbbrd discovered nesting grid containers that all have 100% height can cause many-seconds of rendering delay. Probably not something you'll ever have to worry about, but still, interesting. From the comments: What a funny...

Sass !default and themeable design systems


This is a great blog post from Brad Frost where he walks us through an interesting example. Let’s say we’re making a theme and we have some Sass like this: .c-text-input { background-color: $form-background-color; padding: 10px } If the $form-background-color variable isn’t defined then...

Negative Margins


PPK digs into the subject, which he found woefully undercovered in web tech documentation. Our entry doesn't mention them at all, which I'll aim to fix. Agree on this situation: This is by far the most common use case for negative margins. You give a container a padding so that its contents have...

I Pressed ⌘B. You Wouldn’t Believe What Happened Next


This talk by Marcin Wichary is — beyond both enthusiastic and outstanding — all about the complexity of UI design, typography, and the lengths his team at Figma has gone to make sure that doing something as simple as selecting a font from a dropdown does what you expect it to. I’d recommend this...

Use a:visited in your CSS stylesheet


Evert Pot: Unfortunately, when setting a new color (e.g. a { color: #44F }) the ‘purple visited link’ feature also gets disabled. I think this is a shame, as there’s so many instances where you’re going through a list of links and want to see what you’ve seen before. The 2 examples I ran into...

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