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

fix: update checkbox, radio, switch label typography to use label2 (13px) typography by default #769

Merged
merged 2 commits into from
Dec 10, 2024
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
2 changes: 1 addition & 1 deletion src/dev/pages/checkbox/checkbox.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div>
<h3 class="forge-typography--heading2">CSS-based Checkbox</h3>
<label class="forge-typography--label1" style="display: flex; align-items: center;">
<label class="forge-typography--label2" style="display: flex; align-items: center;">
<div class="forge-checkbox">
<input type="checkbox" id="css-checkbox" />
<div class="forge-checkbox__icon"></div>
Expand Down
6 changes: 3 additions & 3 deletions src/dev/pages/radio/radio.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<div class="forge-radio">
<input type="radio" name="css" id="css-radio-1" />
</div>
<label class="forge-typography--label1" for="css-radio-1">Option 1</label>
<label class="forge-typography--label2" for="css-radio-1">Option 1</label>
<div class="forge-radio">
<input type="radio" name="css" id="css-radio-2" />
</div>
<label class="forge-typography--label1" for="css-radio-2">Option 2</label>
<label class="forge-typography--label2" for="css-radio-2">Option 2</label>
<div class="forge-radio">
<input type="radio" name="css" id="css-radio-3" />
</div>
<label class="forge-typography--label1" for="css-radio-3">Option 3</label>
<label class="forge-typography--label2" for="css-radio-3">Option 3</label>
</div>
</form>

Expand Down
2 changes: 1 addition & 1 deletion src/dev/pages/switch/switch.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div>
<h3 class="forge-typography--heading2">CSS-based Switch</h3>
<label class="forge-typography--label1" style="display: flex; align-items: center;">
<label class="forge-typography--label2" style="display: flex; align-items: center;">
<div class="forge-switch">
<input type="checkbox" switch />
<div class="forge-switch__thumb">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/checkbox/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
}

@mixin label {
@include typography.style(label1);
@include typography.style(label2);

cursor: default;
}
2 changes: 1 addition & 1 deletion src/lib/radio/radio/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}

@mixin label {
@include typography.style(label1);
@include typography.style(label2);

cursor: default;

Expand Down
2 changes: 1 addition & 1 deletion src/lib/switch/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ $_handle-on-translate: calc(#{token(track-width)} - #{$_track-border-radius} * 2
}

@mixin label {
@include typography.style(label1);
@include typography.style(label2);

&:empty {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion src/stories/components/checkbox/Checkbox.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const CSSOnly: Story = {
'forge-checkbox--dense': dense
});
return html`
<label class="forge-typography--label1" style="display: flex; align-items: center;">
<label class="forge-typography--label2" style="display: flex; align-items: center;">
<div class=${classes}>
<input type="checkbox" .checked=${checked} .indeterminate=${indeterminate} ?disabled=${disabled} />
<div class="forge-checkbox__icon"></div>
Expand Down
6 changes: 3 additions & 3 deletions src/stories/components/radio/Radio.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ export const CSSOnly: Story = {
<div class=${classMap(classes)}>
<input type="radio" name="css-radio" ?disabled=${disabled} id="css-radio-1" />
</div>
<label class="forge-typography--label1" for="css-radio-1">Option 1</label>
<label class="forge-typography--label2" for="css-radio-1">Option 1</label>
<div class=${classMap(classes)}>
<input type="radio" name="css-radio" ?disabled=${disabled} id="css-radio-2" />
</div>
<label class="forge-typography--label1" for="css-radio-2">Option 2</label>
<label class="forge-typography--label2" for="css-radio-2">Option 2</label>
<div class=${classMap(classes)}>
<input type="radio" name="css-radio" ?disabled=${disabled} id="css-radio-3" />
</div>
<label class="forge-typography--label1" for="css-radio-3">Option 3</label>
<label class="forge-typography--label2" for="css-radio-3">Option 3</label>
</div>
`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/stories/components/switch/Switch.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const CSSOnly: Story = {
'forge-switch--dense': dense
};
return html`
<label class="forge-typography--label1" style="display: flex; align-items: center;">
<label class="forge-typography--label2" style="display: flex; align-items: center;">
<div class=${classMap(classes)}>
<input type="checkbox" switch .checked=${on} ?disabled=${disabled} />
<div class="forge-switch__thumb">
Expand Down
Loading