Skip to content

Commit

Permalink
breakpoints and backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagameow committed Jul 9, 2024
1 parent e5187a5 commit c596c57
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 1 deletion.
53 changes: 53 additions & 0 deletions src/assets/backgrounds/background-mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions src/assets/backgrounds/background-tablet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
10 changes: 9 additions & 1 deletion src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

body {
color: var(--color-text);
background: url('background.svg');
background: url('backgrounds/background-mobile.svg');
background-size: cover;
font-family: Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans',
'Helvetica Neue', sans-serif;
Expand All @@ -45,4 +45,12 @@ body {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
padding: 0 2rem;

@media only screen and (min-width: var(--breakpoint-tablet)) {
background: url('backgrounds/background-tablet.svg');
}

@media only screen and (min-width: var(--breakpoint-desktop)) {
background: url('backgrounds/background.svg');
}
}
4 changes: 4 additions & 0 deletions src/assets/breakpoints.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root {
--breakpoint-tablet: 481px;
--breakpoint-desktop: 1025px;
}
1 change: 1 addition & 0 deletions src/assets/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import './base.css';
@import './breakpoints.css';

#app {
max-width: 1980px;
Expand Down

0 comments on commit c596c57

Please sign in to comment.