-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(shiraha-ve): π update styles
- Loading branch information
Showing
6 changed files
with
99 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script lang="ts"> | ||
import type { Hst } from '@histoire/plugin-svelte' | ||
import 'shiraha-ve/dist/typography/heading/global.css' | ||
export let Hst: Hst | ||
let headings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] | ||
let hText = 'Heading' | ||
let pText = `Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit, | ||
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br /> | ||
In hac habitasse platea dictumst quisque. | ||
Nam libero justo laoreet sit amet cursus sit amet.` | ||
</script> | ||
|
||
<Hst.Story title="Heading"> | ||
<Hst.Variant title="default"> | ||
{#each headings as heading} | ||
<svelte:element this={heading}> | ||
{@html hText} | ||
{heading.at(1)} | ||
</svelte:element> | ||
{#if pText} | ||
<p>{@html pText}</p> | ||
{/if} | ||
{/each} | ||
</Hst.Variant> | ||
|
||
<svelte:fragment slot="controls"> | ||
<Hst.Text bind:value={hText} title="Heading Text" /> | ||
<Hst.Textarea bind:value={pText} title="Paragraph Text" /> | ||
</svelte:fragment> | ||
</Hst.Story> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a-ve/src/typography/divider.global.css.ts β ...a-ve/src/typography/divider/global.css.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Adaptive Type Scale | ||
* 1.2x ~ 1.25x | ||
* 20rem (320px) ~ 52.5rem (840px) | ||
* {@link https://typescale.com} | ||
* {@link https://royalfig.github.io/fluid-typography-calculator/} | ||
*/ | ||
|
||
import { globalStyle } from '@vanilla-extract/css' | ||
import OP from 'open-props' | ||
|
||
import * as styles from './style' | ||
|
||
globalStyle(':where(h1, h2, h3, h4)', { | ||
'@supports': { | ||
'(text-wrap: pretty)': { | ||
textWrap: 'pretty', | ||
}, | ||
'not (text-wrap: pretty)': { | ||
textWrap: 'balance', | ||
}, | ||
}, | ||
'fontWeight': OP.fontWeight6, | ||
// 'margin': '3rem 0 1.38rem', | ||
}) | ||
|
||
globalStyle(':where(h1), .h1', styles.h1) | ||
|
||
globalStyle(':where(h2), .h2', styles.h2) | ||
|
||
globalStyle(':where(h3), .h3', styles.h3) | ||
|
||
globalStyle(':where(h4), .h4', styles.h4) | ||
|
||
globalStyle(':where(h5), .h5', styles.h5) | ||
|
||
globalStyle(':where(h6), .h6', styles.h6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { ComplexStyleRule } from '@vanilla-extract/css' | ||
|
||
export const h1 = { | ||
fontSize: 'clamp(2.49rem, 2.14rem + 1.73vw, 3.05rem)', | ||
marginTop: 0, | ||
} as const satisfies ComplexStyleRule | ||
|
||
export const h2 = { | ||
fontSize: 'clamp(2.07rem, 1.85rem + 1.13vw, 2.44rem)', | ||
} as const satisfies ComplexStyleRule | ||
|
||
export const h3 = { | ||
fontSize: 'clamp(1.73rem, 1.59rem + 0.69vw, 1.95rem)', | ||
} as const satisfies ComplexStyleRule | ||
|
||
export const h4 = { | ||
fontSize: 'clamp(1.44rem, 1.36rem + 0.38vw, 1.56rem)', | ||
} as const satisfies ComplexStyleRule | ||
|
||
export const h5 = { | ||
fontSize: 'clamp(1.2rem, 1.17rem + 0.15vw, 1.25rem)', | ||
} as const satisfies ComplexStyleRule | ||
|
||
export const h6 = { | ||
fontSize: 'clamp(0.8rem, 0.78rem + 0.1vw, 0.83rem)', | ||
} as const satisfies ComplexStyleRule |