Skip to content

Commit

Permalink
Add global :root css vars for page width
Browse files Browse the repository at this point in the history
  • Loading branch information
frdsndr committed Dec 14, 2021
1 parent 7b01414 commit 2f16475
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/kaboom/footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const footerCss = `
}
.footer-container {
max-width: 1200px;
max-width: var(--max-width, 1200px);
margin: 0 auto;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/kaboom/navBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const navTemplate = document.createElement('template');
navTemplate.innerHTML = `
<style>
nav {
max-width: 1200px;
max-width: var(--max-width, 800px);
margin: 0 auto;
padding: 1rem 0 0 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const template = document.createElement('template');
template.innerHTML = `
<style>
.profilesWrapper {
max-width: 800px;
max-width: -var(--max-width, 800px);
margin: 0 auto;
text-align: center;
}
Expand Down
7 changes: 6 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* some basic kbsb styles */

/* global variables */
:root {
--max-width: 800px;
}

html {
font-size: 14px;
}
Expand All @@ -13,7 +18,7 @@ body {
}

.container {
max-width: 1200px;
max-width: var(--max-width);
margin: 0 auto;
}

Expand Down

0 comments on commit 2f16475

Please sign in to comment.