Better HN
topnewbestaskshowjobs
Log inSign up

clairity

9,767 karma · joined Jan 23, 2014 (12y ago) · 4,327 submissions

jack-of-all-trades startup founder, mba and mechanical engineering degree holder, basketball player, and animal lover.

[ my public key: https://keybase.io/clairity; my proof: https://keybase.io/clairity/sigs/ma5o_Z3EY_dqOeB7SVbxVEV9kRTXFx0l4kYLtxhMvc4 ]

Submissions

comment 4y ago · link · parent

not remove, but rather replace. put the BQE underground.

comment 4y ago · link · parent

are OG form elements actually reimplemented in shadow DOM, like they're doing with open UI (https://open-ui.org/) custom elements?

i've seen safari and chrome (but not firefox) expose some form input components as shadow DOM (e.g., slots), but wasn't sure if it was actually reimplemented.

comment 4y ago · link · parent

yes, i was excited about finding this explanatory article because i knew there was a mathematical basis behind the scenes for these blend modes, but it's not obvious from the names. just the grouping of the modes should help with recall in the future.

comment 4y ago · link · parent

there's a subtlety missing: :is() selects the highest specificity from the selector list while :where() sets specificity to 0 for anything in the selector list. this leaves out the (admittedly narrow) case where you want the lowest matching specificity (in case 2+ selectors match) rather than just 0, which is probably what most folks would expect, just as we would tend to expect selector lists to be forgiving (following the principle of least surprise).

185.

Blending Modes(typefully.com ↗)

239 points · by clairity · 4y ago · 39 comments

comment 4y ago · link · parent

you're right, it's an online discussion. the traffic from the BQE already goes to local streets. the point is to give the above ground space back to people, and perhaps clean the air while we're at it.

comment 4y ago · link · parent

you could also put in a subway track down the middle while you're at it, but the primary point of undergrounding the road is so we get our most precious above ground space back for people, not cars. it's not simply about optimizing throughput, though that's also a worthy, and compatible, goal.

comment 4y ago · link · parent

:has() is my most anticipated as well. it has the biggest potential to not only simplify our html (e.g., divitis) but also remove the need for js compensations in many content-oriented sites. come on firefox, let's get :has() across the finish line!

container queries are also neat, but still rely on having a wrapper container, which isn't ideal--why can't i style the component itself based on its own calculated height/width rather than having to involve a parent element?

i'm still waiting for chrome to implement subgrid, which will simplify any kind of card-type layout.

i also wish we had native "mixins" (@apply had this potential, but it was removed from the spec), so we could have a bundle of styles we could inject into different declarations as a group. then you could have different sets of styles in orthogonal groups (layout, spacing, border, text, inline) that you could apply in any combination. this is especially useful if you want to style a base html element a certain way and then also have a utility class with the same style later in the stylesheet (with maybe a slight tweak) that can be applied to more than just that type of element (like <div>s, <article>s, and <section>s).

edit: oh, and lch/oklch for more perceptually uniform and expanded colorspaces, combined with the new color functions (e.g., color-mix) is exciting too.

comment 4y ago · link · parent

i believe the problem with form elements like checkboxes is that they are 'replaced elements', which the browser defers to the underlying operating system, and that's why it requires a "hack" like accent-color rather than direct styling. this is also why you can't use ::before and ::after on form elements (to do things like add a 'required' indicator using css only).

190.

A World-Class Code Playground with Sandpack(joshwcomeau.com ↗)

1 points · by clairity · 4y ago · discuss

191.

CSS-Only Type Grinding: Casting Tokens (Sm|Md|etc.) into Useful Values(bitovi.com ↗)

2 points · by clairity · 4y ago · discuss

comment 4y ago · link · parent

pretty sure the contractors and engineers would consider that before they started digging. do you think boston didn't have underground infrastructure already?

comment 4y ago · link · parent

this is neat, but seems to be focused primarily on the configurations of thoroughfare lanes? i'd love something that lets you change with setbacks, parkways, sidewalks, building heights/shadows as well, then render that reasonably (but not necessarily perfectly photorealistically) for sharing and discussion.

comment 4y ago · link · parent

put the BQE underground and you get the best of both worlds. scrub all the pollution (not CO₂) out of the exhaust and it's environmentally positive too. sure, it's expensive, but we're the richest country in the world. boston did it and everyone loves the result now despite the grousing about cost and inconvenience during construction.

comment 4y ago · link · parent

you'll have to visit this page in a chromium-based browser as it depends on the experimental @property feature. the site style features the author's http://augmented-ui.com/ design, which is also css only.

196.

CSS-bin-bits: API for 16-bit binary operations in CSS only(propjockey.github.io ↗)

1 points · by clairity · 4y ago · 1 comment

comment 4y ago · link · parent

yah, the other neat thing about lab/lch/oklab/oklch is that they're theoretically unbounded, so as our screens get better at reproducing more of the visible spectrum, you just use more extant values rather than switching color spaces (unlike rgb & hsl).

i haven't read that book, but i'll have to check it out!

comment 4y ago · link · parent

"monopoly" is a red herring here. if they were under 10%, you might have a case (though there are many factors besides market share that need to be considered, like supplier power).

the issue that we the people, and by extension our antitrust regulators, care about is market distortion, and 15% is well within the range at which a competitor can unduly distort a market in their favor by sheer size alone. markets exist for the benefit of society as a whole, not just giant corporations.

comment 4y ago · link · parent

i'm primarily using hsl now (though have long used rgb before that), but have experimented with oklch because of the promise of an even more uniform perceptual color space. the big problem i found with lch & oklch are discontinuities in the valid ranges of lightness and chroma, which functionally dependent on the hue value (from my perspective that hue is the independent variable to set first).

color spaces definitely defy straightforward intuition about them.

comment 4y ago · link · parent

that's good to hear. hopefully watering regularly and remulching will lead to big beautiful trees here as well!

comment 4y ago · link · parent

yah, good soil is an ecosystem of living things, not an inert medium. urban soil tends to be more depleted and polluted than average, so needs even more attention to get trees to grow. i'm not really a gardener type, but i do love me some trees and shade!

202.

Interactive Map for Multimodal Improvements in LA(la.streetsblog.org ↗)

1 points · by clairity · 4y ago · discuss

comment 4y ago · link · parent

yes, LA has a program to give away trees for planting in yards and parkways, and my read of the program is that, while it's goal is laudable, the implementation is lacking. earlier this year, a partner non-profit planted 2 trees for us and i planted an additional 2 trees that another org gave us, and i learned that it's not a set-it-and-forget-it type of endeavor. walking around my neighborhood, many of these trees, even though most are native species adapted to the environment, will end up dying because of the lack of care and the lack of education that comes with the trees. beyond enriching the soil when planting, it apparently takes ~5 years for the trees to establish themselves, and so requires constant watering for at least that amount of time.

ours sprouted quickly when first planted but then stagnated through the hottest parts of the summer. now we're entering the winter season and i'm wondering what we need to do to revitalize the soil again to help them grow in the spring.

comment 4y ago · link · parent

abortion has been a personal choice for most of humanity. only relatively recently have social mores become coercive like this, on which foucault wrote a whole treatise.

comment 4y ago · link · parent

abortion itself, being a personal decision/action, doesn't seek to affect the thoughts and behaviors of other people. perhaps you mean anti-abortion, since that attempts to be positively coercive of others?

comment 4y ago · link · parent

too bad it loads 3 trackers and puts all your personal data into salesforce. i think governments shouldn't be allowed to share personal data like this with corporations--e.g., software/servers should have to be on-prem.

207.

Early Days of Container Style Queries(css-tricks.com ↗)

2 points · by clairity · 4y ago · discuss

208.

CSS Nesting Syntax Survey Results(developer.chrome.com ↗)

1 points · by clairity · 4y ago · discuss

comment 4y ago · link · parent

yah, that's the kind of thing subgrid is meant to solve. in my head, the structure looks more like:

  <body class="content">
    <header class="popout"></header>
    <main></main> <!-- implicitly in the content track -->
    <footer class="full"></footer>
  </body>
you shouldn't have to add an extra div inside <main> to be able to use the parent grid. so you subgrid on <main> and get the benefits of just adopting the parent grid for popping things out, rather than nesting with extra divs/classes.

comment 4y ago · link · parent

right, but that's the old, divitis way of doing it. using grid this way let's you set all the children to the content width and then selectively break out of that with just a class on the child element (without extra divs).

i use a responsive gutter in my default grid that is akin to the article's technique, for the same issue that sometimes you want a little padding and sometimes you want full bleed (usually for just the background). once subgrid comes to chrome, it will be even easier to control content width without divitis.

1
678
145