Skip to content

Commit

Permalink
fix: template changing
Browse files Browse the repository at this point in the history
  • Loading branch information
Vattghern203 committed Dec 6, 2023
1 parent c42a0b5 commit 9d670a7
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 82 deletions.
Empty file added src/pages/playground.html
Empty file.
14 changes: 0 additions & 14 deletions src/sass/abstracts/_preferences.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,4 @@ html {
--blend-text-color: #FFF;
--blend-back-color: #000;
--blend-highlight-color: #000;
}


// TEMPLATES


[data-style="sharp"] {

--roundness: 0;
}

[data-style="modern"] {

--spacing: var(--lg);
}
41 changes: 41 additions & 0 deletions src/sass/abstracts/_templates.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
:where(:root, html) {

--roundness: unset; // The border-radius to everything
--theme: dark; // the actual theme in the page
--width: auto; // the witdth of an element
--height: auto; // the height of each element

// CONTROL VARS ---------------------------------

--main-container-size: 80dvw;
--min-layou-size: 20rem;

// These are the variables that generate all the style system

--base: 1.6rem; // Represent the inital value for measurements
--spacing: .8rem; // the spacing between elements

--jump: 2; // the jump value between elements

// SPACING VARS

--spacing-y: calc(--spacing / 2);
--spacing-x: calc(--spacing * 2);

// COLOR SPECIFIC

--destructive: #772626;
}

:where(:root[data-template="modern"]) {
--base: 2.4rem;

--min-container-size: 60dvw;
}

:where(:root[data-template="classic"]) {

--base: 1rem;
}

:where(:root[data-template="roundy"]) {}
22 changes: 1 addition & 21 deletions src/sass/abstracts/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
@use "color-palette";
@use "props";
@use "templates"; // Base Styles and Templates
@use "../utils/vars";

:where(:root, html) {
// GLOBAL SCOPED VARS

--roundness: unset; // The border-radius to everything
--jump: 2; // the jump value between elements
--theme: dark; // the actual theme in the page
--width: auto; // the witdth of an element
--height: auto; // the height of each element

// CONTROL VARS ---------------------------------

// These are the variables that generate all the style system

--base: 1.6rem; // Represent the inital value for measurements
--spacing: .8rem; // the spacing between elements

// SPACING VARS

--spacing-y: calc(--spacing / 2);
--spacing-x: calc(--spacing * 2);

// MEASUREMENTS

Expand All @@ -39,8 +21,6 @@

// Color created with the palette

--destructive: #772626;

--light-destructive: color-mix(in oklab, var(--destructive), #FFF 30%);

// Blend Colors -----------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions src/sass/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ body, .app, #root {
//gap: var(--spacing); Testing for hero section
background-color: var(--bg);

//padding: calc(12vw - 1em);

& > :where(nav, header, main, footer):not(.hero) {
--bg: var(--background);
background-color: var(--bg);
Expand Down
28 changes: 23 additions & 5 deletions src/sass/layout/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
body > footer {
--_width: 100%;
--_height: 35vmin;
--_bg: var(--muted-background);

--_txt: color-mix(in oklab, var(--text-color) 90%, black 10%);

font-size: calc(10vw - var(--footer-size));

background-color: var(--_bg);

color: var(--_txt);
align-self: flex-end;
display: grid;

padding-block: var(--3xl);
padding-inline: var(--lg);

place-items: center;
width: var(--_width);
height: var(--_height);
border-top: .1rem solid var(--foreground-accent);
height: clamp(var(--_height), auto, fit-content);
border-top: .2rem solid var(--muted-accent);

display: grid;
place-items: center;

& ul {
display: flex;
align-items: center;
justify-content: center;
display: grid;
place-items: center;
grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));

& li {

font-size: calc(10vw - var(--footer-size));
}


& a {
color: var(--_txt);
Expand Down
19 changes: 10 additions & 9 deletions src/sass/layout/_main.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
body > main {
--width: 50%;
--height: auto;
--spacing: var(--lg);
--bg: inherit;
--_width: var(--main-container-size);
--_height: auto;
--_spacing-y: var(--spacing-y);
--_bg: inherit;

width: max(var(--width), 80dvw);
height: var(--height);
padding: var(--lg) var(--xl);
width: clamp(20rem, var(--_width), 100dvw);
height: var(--_height);
//padding: var(--lg) var(--xl);
border-radius: var(--roundness);
margin-block: var(--spacing);
background-color: var(--bg);
margin-block: var(--_spacing-y);
//margin-inline: auto;
background-color: var(--_bg);
}
79 changes: 47 additions & 32 deletions src/styles/yonaka.temps.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/styles/yonaka.temps.css.map

Large diffs are not rendered by default.

0 comments on commit 9d670a7

Please sign in to comment.