Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

These look standard. Chrome already implements them:

https://developer.mozilla.org/en-US/docs/Web/CSS/text-decora...



sort by: page size:

I am a frontend dev and agree it could be done with CSS similar to this [0]

[0] https://codepen.io/jh3y/pen/oNqdmbW



This reminds me of picnic.css [0], which uses the same technique of styling everything nicely by default, but adds some options for changing things when you want.

[0] https://picnicss.com/


There are primitives like that, such as https://developer.mozilla.org/en-US/docs/Web/HTML/Element/in...

There's even a color picker in native html now.


Nothing but Chromiums support this, but it should be happening in the not too distant future: https://caniuse.com/css-anchor-positioning

Cool! A while ago I was experimenting with something like this but using CSS text-shadow instead: https://codepen.io/enhdless/pen/NYMpEw

You may want to have a look into CSS @apply - https://tabatkins.github.io/specs/css-apply-rule/ (currently supported only in Chrome trough).

Firefox Color should let you customize those: https://color.firefox.com/

Very simple CSS only example, including JS-free toggling:

https://codepen.io/theprojectsomething/pen/oNQYqRw

Note: Could be simplified with the :has selector but it isn't currently supported in Firefox.


Ain't there yet but soon we should be able to do this without CSS

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/me...


CSS grid can do this! Sure not as freedom as a JS implementation but its good enough in 95% of scenarios in my experience! https://codepen.io/balazs_sziklai/pen/mOwoLg (not my code - just one of the examples on codepen)

take a look at LESS CSS. It does exactly this and more. http://lesscss.org/


The CSS text module has some support for various text manipulations (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Text) but it's obviously not quite as extensive as LaTeX or InDesign or whatever.

There is https://v0.dev/ from Vercel, but I think this is a too complicated problem to be solved right now by AI.

CSS seems like an intractable problem in general.


You can do this with styled-components in react too.

https://www.styled-components.com/


I replied to the top post, but just in case, here is my idea

It uses prefers-color-scheme and 28 lines of CSS:

https://pastebin.com/4JYbSi5F


You could also use Font Awesome for something similar: http://jsfiddle.net/sv8Lm/

Hi erable, I can show you a sample CSS generated by current version: http://jsfiddle.net/tomaskafka/ZXgqN/
next

Legal | privacy