Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update agreed global style tags #14

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,15 @@ OpenSCD core sets the following CSS variables on the plugin:

```css
* {
--oscd-primary: var(--oscd-theme-primary, #2aa198);
--oscd-secondary: var(--oscd-theme-secondary, #6c71c4);
--oscd-error: var(--oscd-theme-error, #dc322f);

--oscd-accent-yellow: var(--oscd-theme-accent-yellow, #b58900);
--oscd-accent-orange: var(--oscd-theme-accent-orange, #cb4b16);
--oscd-accent-red: var(--oscd-theme-accent-red, #dc322f);
--oscd-accent-magenta: var(--oscd-theme-accent-magenta, #d33682);
--oscd-accent-violet: var(--oscd-theme-accent-violet, #6c71c4);
--oscd-accent-blue: var(--oscd-theme-accent-blue, #268bd2);
--oscd-accent-cyan: var(--oscd-theme-accent-cyan, #2aa198);
--oscd-accent-green: var(--oscd-theme-accent-green, #859900);
Comment on lines +310 to +317
Copy link

Choose a reason for hiding this comment

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

Suggested change
--oscd-accent-yellow: var(--oscd-theme-accent-yellow, #b58900);
--oscd-accent-orange: var(--oscd-theme-accent-orange, #cb4b16);
--oscd-accent-red: var(--oscd-theme-accent-red, #dc322f);
--oscd-accent-magenta: var(--oscd-theme-accent-magenta, #d33682);
--oscd-accent-violet: var(--oscd-theme-accent-violet, #6c71c4);
--oscd-accent-blue: var(--oscd-theme-accent-blue, #268bd2);
--oscd-accent-cyan: var(--oscd-theme-accent-cyan, #2aa198);
--oscd-accent-green: var(--oscd-theme-accent-green, #859900);
--oscd-yellow: var(--oscd-theme-yellow, #b58900);
--oscd-orange: var(--oscd-theme-orange, #cb4b16);
--oscd-red: var(--oscd-theme-red, #dc322f);
--oscd-magenta: var(--oscd-theme-magenta, #d33682);
--oscd-violet: var(--oscd-theme-violet, #6c71c4);
--oscd-blue: var(--oscd-theme-blue, #268bd2);
--oscd-cyan: var(--oscd-theme-cyan, #2aa198);
--oscd-green: var(--oscd-theme-green, #859900);

I'd personally prefer these shorter variable names. What do you think about them?

Explanation:

With the hitherto provided variable names (primary, secondary, error, base2, text-font, etc.) my goal was to make them as short and snappy as possible for the benefit of plugin authors.

Had we created a full CSS design system instead of just theming tokens for a single app, we should have come up with some modular naming scheme like oscd-color-primary-100 oscd-color-base2-100 oscd-font-text-body-regular or something like that. I thought that level of verbosity wasn't needed here.


--oscd-base03: var(--oscd-theme-base03, #002b36);
--oscd-base02: var(--oscd-theme-base02, #073642);
--oscd-base01: var(--oscd-theme-base01, #586e75);
Expand All @@ -320,6 +325,10 @@ OpenSCD core sets the following CSS variables on the plugin:
--oscd-base2: var(--oscd-theme-base2, #eee8d5);
--oscd-base3: var(--oscd-theme-base3, #fdf6e3);

--oscd-primary: var(--oscd-theme-primary, var(--oscd-accent-cyan));
--oscd-secondary: var(--oscd-theme-secondary, var(--oscd-accent-violet));
--oscd-error: var(--oscd-theme-error, var(--oscd-accent-red));

--oscd-text-font: var(--oscd-theme-text-font, 'Roboto');
--oscd-icon-font: var(--oscd-theme-icon-font, 'Material Icons');
}
Expand Down
Loading