Skip to content

Remove -sem to see if people like it better.#6656

Open
dbatiste wants to merge 1 commit intomainfrom
dbatiste/remove-sem
Open

Remove -sem to see if people like it better.#6656
dbatiste wants to merge 1 commit intomainfrom
dbatiste/remove-sem

Conversation

@dbatiste
Copy link
Contributor

@dbatiste dbatiste commented Mar 4, 2026

GAUD-9068

This removes -sem- from the semantic variables.

I don't feel strongly about it. It sounds like Jeff might lean towards keeping it. If devs really prefer not having it, we'll remove it before applying it to a lot of components.

@dbatiste dbatiste requested a review from a team as a code owner March 4, 2026 16:51
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-6656/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

--d2l-sem-shadow-inset-blur: 0;
--d2l-sem-shadow-inset-spread: 0;
--d2l-sem-shadow-inset: inset var(--d2l-shadow-inset-offset-x) var(--d2l-shadow-inset-offset-y) var(--d2l-shadow-inset-blur) var(--d2l-shadow-inset-spread) var(--d2l-shadow-inset-color);
--d2l-background-color-base: #ffffff;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll admit that it does feel a bit naked now, but I think I still prefer it to sem.

What about something like -theme-? So --d2l-theme-background-color-base.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely an option I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other ones I'd thought of were --d2l-core-* or --d2l-ui-*. Don't necessarily love them, but they're short and I like them more than sem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d2l-mode-* is also an option if four letters is fine and we're set on different color/spacing "modes" 🤷‍♀️

--d2l-sem-shadow-inset: inset var(--d2l-shadow-inset-offset-x) var(--d2l-shadow-inset-offset-y) var(--d2l-shadow-inset-blur) var(--d2l-shadow-inset-spread) var(--d2l-shadow-inset-color);
--d2l-background-color-base: #ffffff;
--d2l-background-color-elevated: var(--d2l-background-color-base);
--d2l-background-color-floating: var(--d2l-background-color-base);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also tighten up the background-color to just be bg-color and fg-color, which I've noticed GH does.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I wouldn't mind that - in effort to keep them a bit shorter, more readable, etc.

With that, would --d2l-text-color-static-faint become --d2l-text-fg-color-static-faint? And --d2l-icon-color-faint become --d2l-icon-fg-color-faint? There are status colors too but they are different - they can be applied as either border and backgrounds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets a little murky yeah. bg-color seems obvious. We could say fg-color applies to text so yeah that would mean we could drop the -text- bit. If an icon color and the text colour are different (which they are in light mode anyway), then we could just keep d2l-icon-color and not worry about putting fg in it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So three options I think:

  1. Keep it as it is, with the option of shortening background to bg.
  2. Treat fg (foreground) equivalent to text, so d2l-text-color-base becomes d2l-fg-color-base (dropping the text). But icons are different so they'd still be d2l-icon-color.
  3. Put fg in front of all "foreground" things, which makes it d2l-text-fg-color and d2l-icon-fg-color. It might be a little weird but in theory it would allow us to have d2l-text-bg-color if we ever wanted that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I nudged @geurts since there an effort to keep the language in Figma fairly aligned with the vocabulary in code. Removing text here but not in Figma would be a more noteworthy difference.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 3) above covers that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't really understand 3 ... so you're saying we could add "fg" or "bg" after "text" and "icon", so that they have both "fg" and "bg" variables (though initially we don't have any use for "bg" variables for these)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One solution we didn't discuss, but which is constantly rattling around in my head, is to update icons to use the same "standard" colour as text. This would bring them closer together so we could just have a "fg" top level category that addresses both icons and text. I remember making them different was a tough call at the time, and I could have gone either way.

Example — before:
image

After:
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah exactly, and Dave's example of where we might have a background for text would be selected. But yeah, if that discrepancy between text & icon colours went away, then it could just be fg and be used by both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although if we did that, consider what it might mean if we need them to be distinct later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants