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

refactor!: use base 16 font size #1033

Merged
merged 4 commits into from
Oct 9, 2023
Merged
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
37 changes: 37 additions & 0 deletions .changeset/fuzzy-days-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@launchpad-ui/progress-bubbles': minor
'@launchpad-ui/split-button': minor
'@launchpad-ui/navigation': minor
'@launchpad-ui/pagination': minor
'@launchpad-ui/clipboard': minor
'@launchpad-ui/markdown': minor
'@launchpad-ui/snackbar': minor
'@launchpad-ui/tab-list': minor
'@launchpad-ui/counter': minor
'@launchpad-ui/popover': minor
'@launchpad-ui/tooltip': minor
'@launchpad-ui/avatar': minor
'@launchpad-ui/banner': minor
'@launchpad-ui/button': minor
'@launchpad-ui/drawer': minor
'@launchpad-ui/filter': minor
'@launchpad-ui/select': minor
'@launchpad-ui/slider': minor
'@launchpad-ui/toggle': minor
'@launchpad-ui/tokens': minor
'@launchpad-ui/alert': minor
'@launchpad-ui/icons': minor
'@launchpad-ui/modal': minor
'@launchpad-ui/table': minor
'@launchpad-ui/toast': minor
'@launchpad-ui/card': minor
'@launchpad-ui/chip': minor
'@launchpad-ui/form': minor
'@launchpad-ui/menu': minor
'@launchpad-ui/tag': minor
'@launchpad-ui/data-table': minor
'@launchpad-ui/inline-edit': minor
'@launchpad-ui/core': minor
---

Use base 16 font size
6 changes: 3 additions & 3 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ export const decorators = [
return (
<MotionConfig reducedMotion="user">
<div style={{ display: 'flex', flexDirection: 'row', minHeight: '100vh' }}>
<div style={{ width: '50vw', padding: '1rem' }}>
<div style={{ width: '50vw', padding: '0.625rem' }}>
<StoryFn />
</div>
<div data-theme="dark" style={{ width: '50vw', padding: '1rem' }}>
<div data-theme="dark" style={{ width: '50vw', padding: '0.625rem' }}>
<StoryFn />
</div>
</div>
Expand All @@ -81,7 +81,7 @@ export const decorators = [
document.documentElement.setAttribute('data-theme', theme);
return (
<MotionConfig reducedMotion="user">
<div style={{ padding: '1rem' }}>
<div style={{ padding: '0.625rem' }}>
<StoryFn />
</div>
</MotionConfig>
Expand Down
2 changes: 1 addition & 1 deletion .storybook/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
html {
font-size: 62.5%;
font-size: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizelegibility;
Expand Down
2 changes: 1 addition & 1 deletion apps/remix/app/routes/components.popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default function Index() {
return (
<Popover isOpen>
<Button>Target</Button>
<div style={{ padding: '2rem' }}>Content to show</div>
<div style={{ padding: '1.25rem' }}>Content to show</div>
</Popover>
);
}
4 changes: 2 additions & 2 deletions apps/remix/app/routes/components.tab-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export default function Index() {
return (
<TabList>
<Item key="1" title="Active tab">
<p style={{ padding: '1rem' }}>Active tab</p>
<p style={{ padding: '0.625rem' }}>Active tab</p>
</Item>
<Item key="2" title="Another tab">
<p style={{ padding: '1rem' }}>Another tab</p>
<p style={{ padding: '0.625rem' }}>Another tab</p>
</Item>
</TabList>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/remix/app/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
html {
font-size: 62.5%;
font-size: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizelegibility;
Expand Down
18 changes: 9 additions & 9 deletions packages/alert/src/styles/Alert.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
.Alert {
position: relative;
display: flex;
gap: 1.4rem;
gap: 0.875rem;
border: none;
padding: 1.4rem 1.8rem;
font-size: 1.4rem;
padding: 0.875rem 1.125rem;
font-size: 0.875rem;
line-height: 1.45;
white-space: normal;
width: 100%;
Expand All @@ -34,15 +34,15 @@

.Alert-heading {
margin-top: 0;
margin-bottom: 0.4rem;
font-size: 1.6rem;
margin-bottom: 0.25rem;
font-size: 1rem;
color: var(--lp-color-text-feedback-base);
font-weight: var(--lp-font-weight-medium);
line-height: 1.25;
}

.Alert :global(.ButtonGroup) {
margin-top: 1.2rem;
margin-top: 0.75rem;
}

.Alert .Alert-icon {
Expand All @@ -58,7 +58,7 @@
/* Alert size variants */

.Alert.Alert--small {
font-size: 1.3rem;
font-size: 0.8125rem;
}

.Alert.Alert--small .Alert-icon {
Expand All @@ -68,7 +68,7 @@

.Alert.Alert--wide {
width: 86%;
margin-top: 0.8rem;
margin-top: 0.5rem;
}

.Alert.Alert--compact {
Expand Down Expand Up @@ -188,7 +188,7 @@

.Alert-content {
flex-grow: 1;
max-width: 70rem;
max-width: 43.75rem;
min-width: 1px;
word-break: break-word;
}
Expand Down
24 changes: 12 additions & 12 deletions packages/avatar/src/styles/Avatar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@
}

.Avatar.Avatar--tiny {
height: 1rem;
width: 1rem;
font-size: 0.5rem;
height: 0.625rem;
width: 0.625rem;
font-size: 0.3125rem;
}

.Avatar.Avatar--small {
height: 1.6rem;
width: 1.6rem;
font-size: 0.8rem;
height: 1rem;
width: 1rem;
font-size: 0.5rem;
}

.Avatar.Avatar--medium {
height: 2.4rem;
width: 2.4rem;
font-size: 1.1rem;
height: 1.5rem;
width: 1.5rem;
font-size: 0.6875rem;
}

.Avatar.Avatar--large {
height: 4rem;
width: 4rem;
font-size: 2rem;
height: 2.5rem;
width: 2.5rem;
font-size: 1.25rem;
}
10 changes: 5 additions & 5 deletions packages/banner/src/styles/Banner.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

.Banner {
display: flex;
padding: 1.4rem 1.8rem;
font-size: 1.4rem;
padding: 0.875rem 1.125rem;
font-size: 0.875rem;
line-height: 1.45;
white-space: normal;
border-bottom: 1px;
Expand All @@ -25,8 +25,8 @@

.Banner-heading {
margin-top: 0;
margin-bottom: 0.4rem;
font-size: 1.6rem;
margin-bottom: 0.25rem;
font-size: 1rem;
font-weight: var(--lp-font-weight-medium);
line-height: 1.25;
}
Expand All @@ -36,7 +36,7 @@
font-style: normal;
font-weight: 400;
font-size: 16px;
margin-left: 1.4rem;
margin-left: 0.875rem;
flex-grow: 1;
}

Expand Down
28 changes: 14 additions & 14 deletions packages/button/src/styles/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@
border-radius: var(--Button-border-radius-default);
font-size: var(--Button-font-size-default);
line-height: var(--Button-line-height-default);
padding: 0.7rem 0.8rem;
padding: 0.4375rem 0.5rem;
cursor: default;
user-select: none;
appearance: none;
min-height: 3.2rem;
min-height: 2rem;
}

.Button--tiny {
border-radius: var(--Button-border-radius-small);
font-size: var(--lp-font-size-100);
line-height: var(--Button-line-height-small);
padding: 0.1rem 0.4rem;
min-height: 2rem;
padding: 0.0625rem 0.25rem;
min-height: 1.25rem;
}

.Button--small {
border-radius: var(--Button-border-radius-small);
font-size: var(--Button-font-size-small);
line-height: var(--Button-line-height-small);
padding: 0.3rem 0.8rem;
min-height: 2.4rem;
padding: 0.1875rem 0.5rem;
min-height: 1.5rem;
}

.Button--big {
font-size: var(--Button-font-size-large);
line-height: var(--Button-line-height-large);
padding: 0.7rem 1.2rem;
min-height: 4rem;
padding: 0.4375rem 0.75rem;
min-height: 2.5rem;
}

.Button--fit {
Expand All @@ -57,11 +57,11 @@
}

.Button:not(.Button--icon) > .Button-icon:first-child {
margin-right: 0.5rem;
margin-right: 0.3125rem;
}

.Button:not(.Button--icon) > .Button-icon:last-child {
margin-left: 0.5rem;
margin-left: 0.3125rem;
}

.Button:hover {
Expand Down Expand Up @@ -389,15 +389,15 @@
.Button.Button--icon {
padding: 0;
line-height: 1;
height: 3.2rem;
width: 3.2rem;
height: 2rem;
width: 2rem;
min-height: auto;
flex-shrink: 0;
}

.Button.Button--icon.Button--small {
height: 2.4rem;
width: 2.4rem;
height: 1.5rem;
width: 1.5rem;
}
/* stylelint-enable no-descending-specificity */

Expand Down
4 changes: 2 additions & 2 deletions packages/button/src/styles/ButtonGroup.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
}

.ButtonGroup--normal {
gap: 1rem;
gap: 0.625rem;
}

.ButtonGroup--large {
gap: 2rem;
gap: 1.25rem;
}

.ButtonGroup--compact > .Button + .Button,
Expand Down
8 changes: 4 additions & 4 deletions packages/button/src/styles/ButtonVariables.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@

/* End Remaining Legacy Tokens */

--Button-font-size-default: 1.4rem;
--Button-font-size-small: 1.4rem;
--Button-font-size-large: 1.6rem;
--Button-font-size-default: 0.875rem;
--Button-font-size-small: 0.875rem;
--Button-font-size-large: 1rem;
--Button-font-weight: var(--lp-font-weight-medium);
--Button-line-height-default: 114%;
--Button-line-height-small: 114%;
--Button-line-height-large: 150%;
--Button-border-radius-default: 0.6rem;
--Button-border-radius-default: 0.375rem;
--Button-border-radius-small: var(--lp-border-radius-regular);
--Button-border-radius-link: 1px;
--Button-border-radius-withIcon: 50%;
Expand Down
4 changes: 2 additions & 2 deletions packages/button/stories/Button.stories.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
.Storygroup-wrapper {
display: grid;
grid-template-rows: 1fr;
grid-template-columns: 12rem auto;
grid-gap: 1.2rem;
grid-template-columns: 7.5rem auto;
grid-gap: 0.75rem;
justify-items: flex-start;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/card/src/styles/Card.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

.sub {
height: 16rem;
height: 10rem;
}

.featureCard:hover {
Expand Down Expand Up @@ -79,7 +79,7 @@ input[type='radio']:focus + .featureCard {
border: var(--lp-border-width-200) solid var(--color-border-interactive-disabled, #e6e6e6);
color: var(--lp-color-text-interactive-disabled);
background-color: var(--lp-color-bg-ui-primary);
height: 6rem;
height: 3.75rem;
}

.hide {
Expand Down
2 changes: 1 addition & 1 deletion packages/card/stories/RadioCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
description: 'A radio button with a label and optional image and subtext.',
decorators: [
(Story: StoryFn) => (
<div style={{ display: 'flex', width: '24rem' }}>
<div style={{ display: 'flex', width: '15rem' }}>
<Story />
</div>
),
Expand Down
Loading
Loading