diff --git a/docs-ve/src/components/footer/global.story.svelte b/docs-ve/src/components/footer/global.story.svelte new file mode 100644 index 0000000..a3f85a9 --- /dev/null +++ b/docs-ve/src/components/footer/global.story.svelte @@ -0,0 +1,49 @@ + + + + + {style} + {styleL} + {styleP} +

Footer with copyright text

+
+

{text}

+
+ +

Two footer

+
+

{text}

+
+
+

{text}

+
+

with main

+
+

Footer with copyright text

+
+

{text}

+
+ +

Two footer

+
+

{text}

+
+
+

{text}

+
+
+
+ + + + +
diff --git a/packages/shiraha-ve/src/components/footer/global.css.ts b/packages/shiraha-ve/src/components/footer/global.css.ts new file mode 100644 index 0000000..f55dff5 --- /dev/null +++ b/packages/shiraha-ve/src/components/footer/global.css.ts @@ -0,0 +1,13 @@ +import { globalStyle } from '@vanilla-extract/css' + +import * as styles from './styles' + +globalStyle(':where(footer)', styles.footer) + +globalStyle(':where(footer):has(+ footer)', styles.footerHasFooter) + +globalStyle(':where(footer+footer)', styles.footerFooter) + +globalStyle(':where(:not(main) footer)', styles.notMainFooter) + +globalStyle(':where(main footer)', styles.mainFooter) diff --git a/packages/shiraha-ve/src/components/footer/styles.ts b/packages/shiraha-ve/src/components/footer/styles.ts new file mode 100644 index 0000000..e7d13ab --- /dev/null +++ b/packages/shiraha-ve/src/components/footer/styles.ts @@ -0,0 +1,35 @@ +import type { ComplexStyleRule } from '@vanilla-extract/css' + +import { vars } from '../../vars.css' + +/** `:where(footer)` */ +export const footer = { + backgroundColor: vars.color.surfaceContainer, + marginTop: '1.5rem', + padding: '1.5rem 0', + width: '100%', +} as const satisfies ComplexStyleRule + +/** `:where(footer):has(+ footer)` (first footer) */ +export const footerHasFooter = { + borderBottomLeftRadius: '0 !important', + borderBottomRightRadius: '0 !important', +} as const satisfies ComplexStyleRule + +/** `:where(footer+footer)` (second footer) */ +export const footerFooter = { + borderTopLeftRadius: '0 !important', + borderTopRightRadius: '0 !important', + marginTop: 1, +} as const satisfies ComplexStyleRule + +/** `:where(:not(main) footer)` */ +export const notMainFooter = { + // TODO: container like `main` +} as const satisfies ComplexStyleRule + +/** `:where(main footer)` */ +export const mainFooter = { + borderRadius: '2rem', + padding: '2rem', +} as const satisfies ComplexStyleRule