Skip to content
Draft
Show file tree
Hide file tree
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
21 changes: 19 additions & 2 deletions src/styles/core.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
/* Core styles for Carbon Visualizer extension */

:where(#carbon-visualizer-welcome-panel,
#carbon-visualizer-welcome-panel *,
#carbon-visualizer-welcome-panel *::before,
#carbon-visualizer-welcome-panel *::after) {
all: revert;
}

/* TODO: these green values were generated using https://oklchroma.utilitybend.com/ and are not part of any design specs.
* The custom properties are used in this file and welcome.css.
* Feel free to remove them in favor of our own color palette!
*/
:root {
#carbon-visualizer-welcome-panel {
/* greens */
--cv-primary-green: hsl(114deg 64.9% 32.0%);
--cv-primary-green-base: 0.05;
Expand All @@ -18,10 +25,20 @@
--cv-primary-green-80: oklch(from var(--cv-primary-green) 80% calc(var(--cv-primary-green-base) + (sin(0.3 * pi) * c)) h);
--cv-primary-green-90: oklch(from var(--cv-primary-green) 90% calc(var(--cv-primary-green-base) + (sin(0.2 * pi) * c)) h);
--cv-primary-green-100: oklch(from var(--cv-primary-green) 100% calc(var(--cv-primary-green-base) + (sin(0.1 * pi) * c)) h);

/* neutrals */
--cv-black: hsl(0deg 0% 0%);
--cv-white: hsl(0deg 0% 100%);

font-family: var(--cv-font-family-sans);

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dt, figure, blockquote) {
line-height: calc(1em + 0.5rem);

&:not(:first-child) {
margin-block-start: 1em;
}
}
}

.cv-panel {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/generic/typography.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cv {
#carbon-visualizer-welcome-panel {
* {
max-inline-size: var(--cv-max-line-length);
}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/themes/default.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cv,
#carbon-visualizer-welcome-panel,
[data-theme] {
/* set up light and dark mode colors */
/* don't use these directly in components */
Expand Down
2 changes: 1 addition & 1 deletion src/styles/tokens/color.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cv {
#carbon-visualizer-welcome-panel {
--cv-color-pink: oklch(50.0% 0.200 345);
--cv-color-pink-base: 0.05;
--cv-color-pink-10: oklch(from var(--cv-color-pink) 10% calc(var(--cv-color-pink-base) + (sin(1.0 * pi) * c)) h);
Expand Down
2 changes: 1 addition & 1 deletion src/styles/tokens/size.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.cv {
#carbon-visualizer-welcome-panel {
--cv-page-gutter: 1.5rem;
--cv-max-content-width: 75rem;
--cv-max-line-length: 72ch;
Expand Down
6 changes: 3 additions & 3 deletions src/styles/tokens/typography.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.cv {
#carbon-visualizer-welcome-panel {
/* somewhat randomly selected system font stacks from https://modernfontstacks.com/ (replace as needed) */
--cv-font-family-display: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif;
--cv-font-family-sans: Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif;
--cv-font-family-serif: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
--cv-font-family-serif: Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif;
--cv-font-family-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

/* commonly needed font sizes, named for what they're used for (avoiding overly specific names like h1, h2, etc.) */
--cv-font-size-display-lg: 7.25rem;
--cv-font-size-display-md: 5.5rem;
--cv-font-size-display-sm: 4rem;
--cv-font-size-heading-xxl: 3rem;
--cv-font-size-heading-xxl: 2.75rem;
--cv-font-size-heading-xl: 2.25rem;
--cv-font-size-heading-lg: 1.75rem;
--cv-font-size-heading-md: 1.25rem;
Expand Down