Skip to content
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
23 changes: 23 additions & 0 deletions apps/www/src/app/examples/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,29 @@ const Page = () => {
<Text size='large' weight='medium' style={{ marginBottom: '24px' }}>
Main
</Text>
<code
style={{
fontFamily: 'var(--rs-font-mono)',
fontSize: 'var(--rs-font-size-regular)',
lineHeight: 'var(--rs-line-height-regular)',
maxWidth: '550px',
padding: '16px'
}}
>{`const button = (x>=2 && y!=3)
const getLoaderOnlyClass = (size) =>
size === 'small'
? styles['loader-only-button-small']
: styles['loader-only-button-normal'];

const test = 10 >= 8 : true : false;


<= < > >= == === != !==

=> ==> && || !! ??
<-- --> *** ****
<!-- -->
/* comment */ /* ---------- __ */`}</code>

<Flex direction='column' gap={4} style={{ maxWidth: '550px' }}>
<Search
Expand Down
105 changes: 74 additions & 31 deletions packages/raystack/styles/typography.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital@0;1&display=swap");

:root {
/* Font Families */
--rs-font-inter: 'Inter', sans-serif;
--rs-font-lora: 'Lora', serif;
--rs-font-josefin-sans: 'Josefin Sans', sans-serif;
/* Fonts */
--rs-font-inter: "Inter";
--rs-font-lora: "Lora";
--rs-font-josefin-sans: "Josefin Sans";
--rs-font-jetbrains-mono: "JetBrains Mono";
--rs-font-menlo: "Menlo";

/* Default Style */
--rs-font-title: var(--rs-font-inter);
--rs-font-body: var(--rs-font-inter);
/* Font Families */
--rs-font-title: var(--rs-font-inter), sans-serif;
--rs-font-body: var(--rs-font-inter), sans-serif;
--rs-font-mono: var(--rs-font-menlo), var(--rs-font-jetbrains-mono), monospace;

/* Font Weights */
--rs-font-weight-regular: 400;
Expand Down Expand Up @@ -54,39 +58,78 @@
--rs-letter-spacing-t2: 0;
--rs-letter-spacing-t3: 0;
--rs-letter-spacing-t4: 0;

/* Font Smoothing */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

/* Mono Font Sizes */
--rs-font-size-mono-mini: 11px;
--rs-font-size-mono-small: 12px;
--rs-font-size-mono-regular: 14px;
--rs-font-size-mono-large: 16px;

/* Mono Line Heights */
--rs-line-height-mono-mini: 16px;
--rs-line-height-mono-small: 16px;
--rs-line-height-mono-regular: 20px;
--rs-line-height-mono-large: 24px;

/* Mono Letter Spacing */
--rs-letter-spacing-mono-mini: 0px;
--rs-letter-spacing-mono-small: 0px;
--rs-letter-spacing-mono-regular: 0px;
--rs-letter-spacing-mono-large: 0px;
}

body, p, h1, h2, h3, h4, h5, h6, span, div, label {
[data-style="traditional"] {
--rs-font-title: var(--rs-font-lora), serif;
--rs-font-body: var(--rs-font-josefin-sans), sans-serif;
}

body {
/* Default Font */
font-family: var(--rs-font-body);

/* Font Smoothing */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

[data-style="modern"] {
--rs-font-title: var(--rs-font-inter);
--rs-font-body: var(--rs-font-inter);
h1 {
font-family: var(--rs-font-title);
font-size: var(--rs-font-size-t4);
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-t1);
}

[data-style="traditional"] {
--rs-font-title: var(--rs-font-lora);
--rs-font-body: var(--rs-font-josefin-sans);
h2 {
font-family: var(--rs-font-title);
font-size: var(--rs-font-size-t3);
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-t1);
}
h3 {
font-family: var(--rs-font-title);
font-size: var(--rs-font-size-t2);
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-t1);
}
h4 {
font-family: var(--rs-font-title);
font-size: var(--rs-font-size-t1);
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-t1);
}

h1 { font-family: var(--rs-font-title); font-size: var(--rs-font-size-t4); font-weight: var(--rs-font-weight-medium); line-height: var(--rs-line-height-t1); }
h2 { font-family: var(--rs-font-title); font-size: var(--rs-font-size-t3); font-weight: var(--rs-font-weight-medium); line-height: var(--rs-line-height-t1); }
h3 { font-family: var(--rs-font-title); font-size: var(--rs-font-size-t2); font-weight: var(--rs-font-weight-medium); line-height: var(--rs-line-height-t1); }
h4 { font-family: var(--rs-font-title); font-size: var(--rs-font-size-t1); font-weight: var(--rs-font-weight-medium); line-height: var(--rs-line-height-t1); }

/* CSS for the text cursor */
input, textarea {
input,
textarea {
caret-color: var(--rs-color-border-accent-emphasis);
}

/* Keyframe Animation */
@keyframes dissolve-hide {
0%, 50% { opacity: 1; }
100% { opacity: 0; }
}
0%,
50% {
opacity: 1;
}
100% {
opacity: 0;
}
}