Search results

0


/*
v4.3.0. Reduce vertical space.
*/
div .status__prepend
{
padding: 5px !important;
padding-bottom: 0px !important;
}
div .status
{
padding-top: 8px !important;
}
.content-warning
{
margin: auto !important;
padding: 2px 2px !important;
}
.content-warning *
{
display: inline !important;
}
.content-warning .link-button
{
margin-left: 5px !important;
margin-top: 5px !important;
}
.search
{
margin-bottom: 10px !important;
}


/*
v4.3.0. Make the toot editing area usable to show >2 lines on Reply/Edit.
*/
.reply-indicator__content, .reply-indicator__content *
{
visibility: collapse !important;
display: none !important;
}
div .link-footer
{
visibility: collapse !important;
}

---
On MS Windows 10 with 125% zoom of 1920x1080 px resolution of 13.3 in screen, with 20 p[xt] font size in Firefox.

Showing the toot being replied to also makes the experience worse.

0


/*
v4.3.0. Reduce vertical space.
*/
div .status__prepend
{
padding: 5px !important;
padding-bottom: 0px !important;
}
div .status
{
padding-top: 8px !important;
}
.content-warning
{
margin: auto !important;
padding: 2px 2px !important;
}
.content-warning *
{
display: inline !important;
}
.content-warning .link-button
{
margin-left: 5px !important;
margin-top: 5px !important;
}
.search
{
margin-bottom: 10px !important;
}

0
0

I wrote a new article: “Solving Shrinkwrap: New Experimental Technique”

kizu.dev/shrinkwrap-solution/

In this article, I present my new technique for solving a  problem that was deemed impossible — true shrinkwrapping of an element with auto-wrapped content.

By using anchor positioning and scroll-driven animations, we can adjust our element’s outer dimensions by measuring its inner contents, demonstrating that for many cases this can already work and might unlock a future native feature.

A screenshot of one of the article’s examples. On a white background, there are several boxes visible in a three-dimensional view. The one in the back has rounded corners, green background and a pink outline, and is shorter. The one in the middle is longer, going the full width of the screenshot, and has a pink background. The one in the front has the following text: “I am a Longer Header; I Will Wrap & Look Bad! Oh no! What Can We Do?”, wrapped after the ampersand and balanced.
0
0
0

Understanding the fundamentals of Layout: "Have you ever struggled to understand why the browser put the element where it did? Do you think CSS is hard to work with? By getting a better understanding of the fundamentals, you’ll learn to 'see the matrix'." polypane.app/blog/understandin

0

I'm and I use xkcd.com/color/rgb/ frequently.

Randall 'xkcd' Monroe did a survey of over 100,000 readers where he showed them random rgb colors and said "what would you call this?" and afterwards he did his best to sort the results into the most popular color names and the colors they refer to.

It's like a box of Crayola for the internet. Finally, my colorblind self can grab a sample of "dark magenta" that doesn't just look like "grape purple" to everyone else.

The data is freely available as a .txt file under CC0, which I've converted into a .css file here: git.hatspace.net/nycki/nycki.n

so now when I want a color on my website I can just write `color: var(--xkcd-off-white)` or so on. it's really convenient :)

edit: blog post discussing this data in more detail: blog.xkcd.com/2010/05/03/color

0
0
0
0
0
0
0
0

Merged.

I don’t recall how long before it shows on MDN, but when it does, the guidance on CSS single page carousels will have fewer WCAG violations.

The multi item example is an auto WCAG failure, and that’s a function of the CSS spec.

Variable aspect ratio cards with conic gradients meeting along the diagonal.

First coded this when we didn't have inverse trigonometric functions in - can you figure out how on your own?

@csstricks post css-tricks.com/variable-aspect

@codepen demo codepen.io/thebabydino/pen/XWp

0

Just published 0.6.0 of refreshcss, a pure library to clean unused .

- Much better modern CSS support via pypi.org/project/tinycss2/, i.e. can now parse Bulma 1.x.
- Use pypi.org/project/justhtml/ for parsing instead of just using regex.
- Much improved performance, i.e. can now reasonably parse the entire 3 MB Tailwind file on the fly! 🚀

🛠️ github.com/adamghill/refreshcss
📦 pypi.org/project/refreshcss/

0
0
0
0
0
0
0

How would you make a parent element have 2x the width & height of a child whose width and height are in turn determined by its content? (width: max-content)

No visual tricks. Parent's content-box dimensions must be double the child's border-box dimensions.

No JS.

Can this be done with pure ?

0

Wake up, wake up, wake up!

If you're a Cheetah+ supporter on Ko-fi or Patreon, then first of all thank you 🙏 and second, I've just published a massive post about an improved technique for flexible irregular shapes.

❇️ ko-fi.com/post/New-year-new-te

❇️ patreon.com/posts/new-year-new

A square image with cutouts depending on the dimensions of corner elements, dimensions that in turn depend on how the text in those corner elements reflows at different viewports.Stepped shape with rounded corners on the right, step height depending on the height of the elements on the left, whose height is given by their content and how it wraps at different viewports.Irregular shaped image with both convex & concave roundings. Shape depends on the dimensions and aspect ratio of other elements, how they scale/ wrap as the viewport changes.Three cards wrap around buttons of different sizes in the bottom right corner. All corners of the card shapes, whether convex or concave, are rounded.
0

Drunk CSS

shkspr.mobi/blog/2025/09/drunk

A decade ago, I was writing about how you should test your user interface on drunk people. It was a semi-serious idea. Some of your users will be drunk when using your app or website. If it is easy for them to use, then it should be easy for sober people to use.

Of course, necking a few shots every time you update your website isn't great for your health - so is there another way?

Click the "🥴 Drunk" button at the top of the page and see what happens!

These are a relatively simple set of CSS rules which you can apply to any site in order to simulate inebriation.

(I may have changed these since writing the post. Check the source for the latest version.)

First, monkey around with the fonts. This sets all the lower-case vowels to be rendered in a different font - as discussed in "targetting specific characters with CSS rules":

 CSS/* Drunk */
@font-face {
    font-family: "Drunk";
    src: url("/blog/wp-content/themes/edent-wordpress-theme/assets/fonts/CommitMonoV143-Edent.woff2") format("woff2");
    /* Lower-Case Vowels */
    unicode-range: U+61, U+65, U+69, U+6F, U+75 ;
    size-adjust: 105%;
}

The rest of the characters will be rendered in the system's default Cursive font. Characters will also be slanted. The first character of every paragraph will be shrunk:

 CSS:root:has(input#drunk:checked) * {
    font-family: "Drunk", cursive;
    font-style: oblique -12deg;
    text-align: end;
}
:root:has(input#drunk:checked) p::first-letter {
    font-size: .5em;
}

Next, use the child selectors to rotate and skew various elements. While we wait for CSS randomness to come to all browsers this is a simple way to select various elements:

 CSS:root:has(input#drunk:checked) *:nth-child(3n) {
    transform: rotate(2deg);
}
:root:has(input#drunk:checked) *:nth-child(5n) {
    transform: skew(5deg, 5deg);
}
:root:has(input#drunk:checked) *:nth-child(7n) {
    transform: rotate(-3deg);
}

Make the entire page blurred and saturate the colours:

 CSS:root:has(input#drunk:checked) body {
    filter: blur(1px) saturate(2.5);
}

Make any hyperlink harder to click by having it gently bounce up and down:

 CSS:root:has(input#drunk:checked) a  {
    animation-name: bounce;
    animation-duration: 4s;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
@keyframes bounce {
    0%   { margin-top:  0px; }
    25%  { margin-top:-10px; }
    50%  { margin-top:  0px; }
    75%  { margin-top: 10px; }
    100% { margin-top:  0px; }
}

Does this really simulate drunkenness? No. It is a pale simulacrum. What it is, however, is deliberately inaccessible to the majority of people.

How does it make you feel using the site in Drunk-Mode? Does it frustrate you? Do your eyes hurt due to the garish colour scheme? Do you keep missing the thing that you try and click on? Are the words so hard to read that it takes you extra time to do anything useful? Will you recommend this experience to your friends and family?

I've written before about cosplaying as being disabled. Strapping on a pair of Glaucoma Goggles will give you an idea of what a visual impairment is like. But it won't give you the experience of living that way for months or years.

You should test your stuff with people who have cognitive impairments or physical disabilities. Find out how usable your site is for someone lacking fine motor control or for those with learning disabilities. Pay disable people to take part in usability studies. Integrate their feedback.

Faffing around with CSS will only get you so far.

0
0

New year, new ideas...

If you're a Cheetah+ member on Ko-fi or Patreon, there's a new post coming as the year also came with an idea on how to improve a clever technique I've been refining for a couple of years now...

It's turning into an everything but the kitchen sink technique... 😹

Sneak peek at an upcoming post.
0
0
0
0

Split text with blended half shadow on @codepen codepen.io/thebabydino/pen/LYv

No text duplication whatsoever, no images other than gradients, no funky fonts* - all done with magic! 🪄✨

*font used here is fonts.google.com/specimen/Rubi - you can see the effect isn't baked into it

Demo screenshot. The text "success" in all caps with a diagonal half split across its face, the bottom right part having an aqua background in addition to being hashed like the top left part. The bottom right part also has a fuchsia drop shadow that is blended with it.

The fine print at the bottom says, in a much smaller cursive font with less contrast: "wake up early, work hard and never give up, your dreams can come true... if you're born rich!"
0

Concave rounded shape (real transparency, no covers) on @codepen codepen.io/thebabydino/pen/KwM

`clip-path`/ `mask` on the image have no idea about the dimensions of corner elems. We need another way to create the shape taking into account how those elements are resized by text reflow.

No magic numbers and no media/ container queries. Instead, we use to add the cutout areas to a frame and on filters to round the shaped frame & to extract just the shaped image.

0
0
0

🦖 rect()
☑️ Newly available (from Jan 2024)

developer.mozilla.org/en-US/do

The rect() CSS function creates a rectangle at the specified distance from the top and left edges of the containing block. It is a basic shape function of the <basic-shape> data type. You can use the rect() function in CSS properties such as offset-path to create the rectangular path along which an element moves and in clip-path to define the shape of …

0