Skip to content

Commit

Permalink
refactor: converte o código CSS atual e do PR 25 para SASS
Browse files Browse the repository at this point in the history
  • Loading branch information
freitaschz committed Sep 26, 2023
1 parent 66e5e93 commit c6bf548
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 34 deletions.
38 changes: 15 additions & 23 deletions assets/css/style.css

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

1 change: 1 addition & 0 deletions assets/css/style.css.map

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

11 changes: 0 additions & 11 deletions assets/css/var.css

This file was deleted.

9 changes: 9 additions & 0 deletions assets/sass/_variables.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$light-green: #5e9188
$dark-green: #3e5954
$dark-blue: #253342
$black: #232226
$white: #ffffff
$purple-500: #6e6197
$gray-500: #9698a0
$gray-300: #cccccc
$gray-100: #f2f2f2
136 changes: 136 additions & 0 deletions assets/sass/style.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap")
@import "variables"

*
margin: 0
padding: 0
box-sizing: border-box

body
background-color: $white
font-family: "Roboto", sans-serif
-webkit-font-smoothing: antialiased
padding: 40px 24px

::-webkit-scrollbar
width: 8px

::-webkit-scrollbar-thumb
border-radius: 8px
background: $purple-500

::-webkit-scrollbar-track
background: $gray-100

html
font-size: 62.5%

input
font-family: "Roboto", sans-serif

.header
display: flex
justify-content: center
align-items: center
flex-direction: column
gap: 24px

&__title img
display: block
max-width: 100%
height: auto

&__subtitle
font-size: 2rem
text-align: center
color: $black
font-weight: 400

.main
display: flex
justify-content: center
align-items: center
flex-direction: column
flex-wrap: wrap
max-width: 1440px
margin: 0 auto

.searchbar
background-color: $gray-100
display: flex
align-items: center
justify-content: center
gap: 16px
border: none
border-radius: 4px
padding: 16px
margin: 30px 0
width: 100%

.cards
display: flex
justify-content: center
align-items: center
flex-wrap: wrap
gap: 32px
margin: 48px 0

.searchbar__icon
width: 24px
height: 24px
fill: $gray-500

.searchbar__input
border: none
border-radius: 4px
background-color: transparent
padding: 4px
flex: 1
color: $black
font-size: 2rem

&:focus
outline: none

.card
width: 20%
flex-grow: 1
max-height: 300px
min-height: 300px
overflow: auto
padding: 24px
border-radius: 8px
background-color: $white
box-shadow: rgba(35, 35, 38, 0.2) 0px 0px 16px
display: list-item
list-style-type: none

&__title
color: $purple-500
margin-bottom: 16px
font-size: 2.4rem

&__description
color: $black
line-height: 160%
font-size: 1.8rem

&__content
margin-top: 16px

&__code
padding: 8px
border-radius: 4px
color: $white
background-color: $purple-500
font-size: 1.4rem // para caber no card e não quebrar linha

@media screen and (max-width: 1200px)
.card
width: 40%

@media screen and (max-width: 768px)
.card
width: 100%
max-height: 250px
min-height: 250px

0 comments on commit c6bf548

Please sign in to comment.