Skip to content

Commit

Permalink
refactor(shiraha-ve): πŸ’„ update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Sep 28, 2023
1 parent 80eefbf commit c950a49
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/shiraha-ve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"style"
],
"exports": {
".": "./dist/shiraha.css",
"./*.css": "./dist/*.css",
"./*.js": {
"types": "./dist/*.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions packages/shiraha-ve/src/typography/blockquote/global.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { globalStyle } from '@vanilla-extract/css'

import * as styles from './styles'

globalStyle('blockquote', styles.blockquote)
10 changes: 10 additions & 0 deletions packages/shiraha-ve/src/typography/blockquote/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { ComplexStyleRule } from '@vanilla-extract/css'

import { vars } from '../../vars.css'

export const blockquote = {
borderLeftColor: vars.color.surfaceVariant,
borderLeftWidth: 2,
fontStyle: 'italic',
marginTop: 24,
} as const satisfies ComplexStyleRule
5 changes: 5 additions & 0 deletions packages/shiraha-ve/src/typography/blockquote/vanilla.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { style } from '@vanilla-extract/css'

import * as styles from './styles'

export const blockquote = style(styles.blockquote)
16 changes: 16 additions & 0 deletions packages/shiraha-ve/src/typography/code/global.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { globalStyle } from '@vanilla-extract/css'
import OP from 'open-props'

import { vars } from '../../vars.css'

globalStyle('code', {
backgroundColor: vars.color.surfaceVariant,
borderRadius: 4,
color: vars.color.onSurfaceVariant,
fontFamily: OP.fontMono,
fontSize: '0.875em',
})

// globalStyle('pre', {
// overflowX: 'auto',
// })
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Line numbers
* {@link https://rehype-pretty-code.netlify.app/}
*/

import { globalStyle } from '@vanilla-extract/css'

globalStyle('code', {
counterReset: 'line',
})

globalStyle('code > [data-line]::before', {
content: 'counter(line)',
counterIncrement: 'line',
})
11 changes: 11 additions & 0 deletions packages/shiraha-ve/src/typography/media/global.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { globalStyle } from '@vanilla-extract/css'

globalStyle('img, audio, video', {
maxWidth: '100%',
})

globalStyle('figure, picture', {
margin: '1rem 0',
})

// globalStyle('figcaption', {})

0 comments on commit c950a49

Please sign in to comment.