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

Demo styling #5185

Merged
merged 43 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bb948d4
docs: global styling
svenadlung May 28, 2024
2f606e4
docs(Examples/Book): demo styling
svenadlung May 28, 2024
c3bcd77
docs(CustomDocument): demo styling
svenadlung May 28, 2024
b888592
docs(Examples/Default): demo styling
svenadlung May 28, 2024
4b9cac8
docs(Examples/Drawing): demo styling
svenadlung May 28, 2024
9d8494a
docs(Examples/Formatting): demo styling
svenadlung May 28, 2024
b691eef
docs(Examples/Images): demo styling
svenadlung May 28, 2024
bf08a7b
docs(Examples/MarkdownShortcuts): demo styling
svenadlung May 28, 2024
0a72c92
docs(Examples/Minimal): demo styling
svenadlung May 28, 2024
85ff323
docs(Examples/Savvy): demo styling
svenadlung May 28, 2024
c9c156a
docs: fix inconsistent spelling
svenadlung May 28, 2024
1ba6cfb
docs: demo styling
svenadlung May 28, 2024
52954f1
docs: demo styling
svenadlung May 28, 2024
499cc59
docs: table demos styling
svenadlung May 28, 2024
6ac8797
docs: remove ToC example
svenadlung May 29, 2024
e03afda
docs: demo stylings
svenadlung May 29, 2024
869f5ea
docs: capitalize consistently
svenadlung May 29, 2024
018d1f0
docs: refactor vue demos
svenadlung May 29, 2024
1454bbf
docs: update demo styles
svenadlung May 30, 2024
0db02ec
test: fix tests
svenadlung May 30, 2024
8e36428
test: fix tests
svenadlung May 30, 2024
64df9c5
test: fix tests
svenadlung May 30, 2024
713595d
test: fix tests
svenadlung May 30, 2024
ac022c4
docs: demo styling
svenadlung May 30, 2024
cb991a5
docs: menu demo styling
svenadlung May 30, 2024
b8e5bcd
docs: fix tests
svenadlung May 30, 2024
52c53a4
Merge branch 'main' into demos/style-demos
svenadlung May 30, 2024
38e2f35
test: fix test
svenadlung May 30, 2024
0de008d
docs: update demos
svenadlung May 30, 2024
74b01e1
docs: use capital letters in demos
svenadlung May 30, 2024
a2931c5
test: fix tests
svenadlung May 31, 2024
2287455
test: fix tests
svenadlung May 31, 2024
f7802c5
test: fix tests
svenadlung May 31, 2024
0f4291a
docs: demo styling
svenadlung May 31, 2024
ed6a856
Merge branch 'main' into demos/style-demos
svenadlung May 31, 2024
5198410
docs: demo styling
svenadlung May 31, 2024
be32175
docs: fix react demo
svenadlung Jun 3, 2024
efb254e
Merge branch 'main' into demos/style-demos
svenadlung Jun 4, 2024
6c8c7a4
docs: update tutorial styles
svenadlung Jun 5, 2024
3144c7f
docs: update styles
svenadlung Jun 5, 2024
05fc8a2
docs: fix styling issue
svenadlung Jun 5, 2024
2aa3605
Merge branch 'main' into demos/style-demos
svenadlung Jun 10, 2024
a810c73
Merge branch 'main' into demos/style-demos
svenadlung Jun 12, 2024
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
314 changes: 291 additions & 23 deletions demos/setup/style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
$colorBlack: #000;
/* Base HTML and global element styles*/
:root {
--white: #FFF;
--black: #2E2B29;
--black-contrast: #110F0E;
--gray-1: rgba(61, 37, 20, 0.05);
--gray-2: rgba(61, 37, 20, 0.08);
--gray-3: rgba(61, 37, 20, 0.12);
--gray-4: rgba(53, 38, 28, 0.30);
--gray-5: rgba(28, 25, 23, 0.60);
--purple: #6A00F5;
--purple-contrast: #5800CC;
--purple-light: rgba(88, 5, 255, 0.05);
--yellow-light: #FFFAE5;
--red: #FF5C33;
--red-light: #FFEBE5;
--shadow: 0px 12px 33px 0px rgba(0, 0, 0, 0.06), 0px 3.618px 9.949px 0px rgba(0, 0, 0, 0.04);
}

*,
*::before,
Expand All @@ -9,32 +26,46 @@ $colorBlack: #000;
html {
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
line-height: 1.5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}

body {
margin: 1rem;
min-height: 10rem;
margin: 0;
}

:first-child {
margin-top: 0;
}

/* Basic editor styles */
.tiptap {
margin: 1.5rem;

&:focus {
outline: none;
}
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
width: 14px;
height: 14px;
width: 14px;
}

::-webkit-scrollbar-track {
border: 4px solid transparent;
background-clip: padding-box;
border-radius: 8px;
background-color: transparent;
border: 4px solid transparent;
border-radius: 8px;
}

::-webkit-scrollbar-thumb {
border: 4px solid rgba(0, 0, 0, 0);
background-clip: padding-box;
border-radius: 8px;
background-color: rgba(0, 0, 0, 0);
border: 4px solid rgba(0, 0, 0, 0);
border-radius: 8px;
}

:hover::-webkit-scrollbar-thumb {
Expand All @@ -47,37 +78,274 @@ body {

::-webkit-scrollbar-button {
display: none;
width: 0;
height: 0;
width: 0;
}

::-webkit-scrollbar-corner {
background-color: transparent;
}

/* Specific element and component styles */
button,
input,
select {
font-size: inherit;
background: var(--gray-2);
border-radius: 0.5rem;
border: none;
color: var(--black);
font-family: inherit;
color: black;
margin: 0.1rem;
border: 1px solid black;
border-radius: 0.3rem;
padding: 0.1rem 0.4rem;
background: white;
accent-color: black;
font-size: 0.875rem;
font-weight: 500;
line-height: 1.15;
margin: none;
padding: 0.375rem 0.625rem;
transition: all 0.2s cubic-bezier(0.65,0.05,0.36,1);

&:hover {
background-color: var(--gray-3);
color: var(--black-contrast);
}

&[disabled] {
opacity: 0.3;
background: var(--gray-1);
color: var(--gray-4);
}

&:checked {
accent-color: var(--purple);
}

&.primary {
background: var(--black);
color: var(--white);

&:hover {
background-color: var(--black-contrast);
}

&[disabled] {
background: var(--gray-1);
color: var(--gray-4);
}
}

&.is-active {
background: var(--purple);
color: var(--white);

&:hover {
background-color: var(--purple-contrast);
color: var(--white);
}
}
}

button:not([disabled]),
select:not([disabled]) {
cursor: pointer;
}

input[type="text"] {
background-color: unset;
border: 1px solid var(--gray-3);
color: var(--black);

&::placeholder {
color: var(--gray-4);
}

&:hover {
background-color: unset;
border-color: var(--gray-4);
}

&:focus-visible, &:focus {
border-color: var(--purple);
outline: none;
}
}

.tiptap:focus {
outline: none;
select {
/* reset */
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="Gray" d="M7 10l5 5 5-5z"/></svg>');
background-repeat: no-repeat;
background-position: right 0.1rem center;
background-size: 1.25rem 1.25rem;
padding-right: 1.25rem;

&:focus {
outline: 0;
}
}

form {
align-items: flex-start;
display: flex;
flex-direction: column;
gap: 0.25rem;
}

.hint {
align-items: center;
background-color: var(--yellow-light);
border-radius: 0.5rem;
border: 1px solid var(--gray-2);
display: flex;
flex-direction: row;
font-size: 0.75rem;
gap: 0.5rem;
line-height: 1.15;
min-height: 1.75rem;
padding: 0.25rem 0.5rem;

&.purple-spinner,
&.error {
justify-content: center;
text-align: center;
width: 100%;
}

&.purple-spinner {
background-color: var(--purple-light);

&::after {
content: "";
background-image: url("data:image/svg+xml;utf8,<svg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='28px' height='30px' viewBox='0 0 24 30' style='enable-background:new 0 0 50 50;' xml:space='preserve'><rect x='0' y='10' width='6' height='10' fill='%236A00F5' rx='3' ry='3'><animateTransform attributeType='xml' attributeName='transform' type='translate' values='0 0; 0 5; 0 -5; 0 0' begin='0' dur='0.6s' repeatCount='indefinite'/></rect><rect x='10' y='10' width='6' height='10' fill='%236A00F5' rx='3' ry='3'><animateTransform attributeType='xml' attributeName='transform' type='translate' values='0 0; 0 5; 0 -5; 0 0' begin='0.2s' dur='0.6s' repeatCount='indefinite'/></rect><rect x='20' y='10' width='6' height='10' fill='%236A00F5' rx='3' ry='3'><animateTransform attributeType='xml' attributeName='transform' type='translate' values='0 0; 0 5; 0 -5; 0 0' begin='0.4s' dur='0.6s' repeatCount='indefinite'/></rect></svg>");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 1rem;
width: 1rem;
}
}

&.error {
background-color: var(--red-light);
}
}

.output-group {
background-color: var(--gray-1);
display: flex;
flex-direction: column;
font-family: 'JetBrainsMono', monospace;
font-size: 0.75rem;
gap: 1rem;
margin-top: 2.5rem;
padding: 1.5rem;

label {
color: var(--black);
font-size: 0.875rem;
font-weight: 700;
line-height: 1.15;
}

code {
font-size: 0.75rem;
}
}

.label,
.label-small,
.label-large {
color: var(--black);
font-size: 0.8125rem;
font-weight: 500;
line-height: 1.15;
}

.is-active {
background: black;
color: white;
.label-small {
color: var(--gray-5);
font-size: 0.75rem;
font-weight: 400;
}

.label-large {
font-size: 0.875rem;
font-weight: 700;
}

hr {
border: none;
border-top: 1px solid var(--gray-3);
margin: 0;
width: 100%;
}

/* Layout and structure */
#app,
.container {
display: flex;
flex-direction: column;
}

.button-group {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
}

.control-group {
align-items: flex-start;
display: flex;
flex-direction: column;
gap: 1rem;
margin: 1.5rem;
}

[data-node-view-wrapper] > .control-group {
margin: 1.5rem 0;
}

.flex-row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 1rem;
justify-content: space-between;
width: 100%;
}

.switch-group {
align-items: center;
background: var(--gray-2);
border-radius: 0.5rem;
display: flex;
flex-direction: row;
flex-wrap: wrap;
flex: 0 1 auto;
justify-content: flex-start;
padding: 0 0.25rem;

label {
align-items: center;
color: var(--gray-5);
cursor: pointer;
display: flex;
flex-direction: row;
font-size: 0.75rem;
font-weight: 500;
gap: 0.25rem;
line-height: 1.15;
min-height: 1.75rem;
padding: 0 0.375rem;
transition: all 0.2s cubic-bezier(0.65,0.05,0.36,1);

&:has(input:checked) {
color: var(--black-contrast);
}

&:hover {
color: var(--black);
}

input {
margin: unset;
}
}
}
Loading