Skip to content

Commit

Permalink
fix(containers.scss): fix alignment of title (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
BcRikko authored and abdallahalsamman committed Dec 9, 2018
1 parent 99011b1 commit a9c9592
Showing 1 changed file with 60 additions and 48 deletions.
108 changes: 60 additions & 48 deletions scss/elements/containers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,56 @@
border-radius: 4px;
}

&.is-center {
text-align: center;
}

&.is-right {
text-align: right;
}

&.with-title {
padding-top: 2rem;

> .title {
display: table;
padding: 0 0.5rem;
margin: -2rem 0 1rem;
font-size: 1rem;
background-color: $background-color;
}

&.is-center {
> .title {
margin: -2rem auto 1rem;
}
}

&.is-right {
> .title {
margin: -2rem 0 1rem auto;
}
}
}

&.is-dark {
color: $background-color;
&::before {
background-color: $base-color;
}

&::after {
border-color: #fff;
}

&.with-title {
> .title {
color: $background-color;
background-color: $base-color;
}
}
}

@mixin rounded($base, $background) {
border: none;
border-radius: 0;
Expand Down Expand Up @@ -70,60 +120,22 @@
left: -8px;
}
}
}

&.is-center {
text-align: center;
}

&.is-right {
text-align: right;
}

&.with-title {
padding-top: 2rem;

> .title {
display: table;
padding: 0 0.5rem;
margin: -2rem 0 1rem;
font-size: 1rem;
background-color: $background-color;
}

&.is-rounded {
> .title {
margin-top: -2.4rem;
}
}

&.is-center {
&.with-title {
> .title {
margin: -2.4rem auto 1rem;
margin-top: -1.5rem;
}
}

&.is-right {
> .title {
margin: -2.4rem 0 1rem auto;
&.is-center {
> .title {
margin: -1.5rem auto 1rem;
}
}
}
}

&.is-dark {
color: $background-color;
&::before {
background-color: $base-color;
}

&::after {
border-color: $background-color;
}

&.with-title {
> .title {
color: $background-color;
background-color: $base-color;
&.is-right {
> .title {
margin: -1.5rem 0 1rem auto;
}
}
}
}
Expand Down

0 comments on commit a9c9592

Please sign in to comment.