css: refactoring & fixing - day 2
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
.grid-layer {
|
||||
%grid-layer {
|
||||
display: grid;
|
||||
font-size: 16px;
|
||||
grid-template-columns: [start]auto[middle]25%[end];
|
||||
@ -11,7 +11,7 @@
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.grid-layer-main {
|
||||
%grid-layer-main {
|
||||
@extend %flex-grid-layer;
|
||||
grid-column-start: start;
|
||||
grid-column-end: end;
|
||||
@ -19,7 +19,7 @@
|
||||
grid-row-end: end;
|
||||
}
|
||||
|
||||
.grid-layer-links {
|
||||
%grid-layer-links {
|
||||
@extend %flex-grid-layer;
|
||||
grid-column-start: middle;
|
||||
grid-column-end: end;
|
||||
@ -27,47 +27,8 @@
|
||||
grid-row-end: middle;
|
||||
}
|
||||
|
||||
.containerH {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.containerV {
|
||||
%containerV {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.grow {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.fix {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.containerCenter {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.reverse {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.col {
|
||||
min-width: 0;
|
||||
}
|
294
src/styles/base/form.scss
Normal file
294
src/styles/base/form.scss
Normal file
@ -0,0 +1,294 @@
|
||||
.content-box {
|
||||
|
||||
&.with-form {
|
||||
|
||||
hd-template-project-title {
|
||||
border-bottom: 1px solid $color-221-51-90;
|
||||
color: $color-233-18-29;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
sib-form {
|
||||
border-bottom: 1px solid $color-210-17-91;
|
||||
padding-bottom: 2.55rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: $color-233-18-29;
|
||||
font-weight: bold;
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p:first-child {
|
||||
margin-bottom: 6.8rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
[name$='-text'] {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
div[name^='block-'] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
input {
|
||||
-webkit-appearance: none;
|
||||
align-items: center;
|
||||
background: $color-222-57-95;
|
||||
border: none;
|
||||
color: $color-233-18-29;
|
||||
display: inline-flex;
|
||||
justify-content: flex-start;
|
||||
line-height: 1.5;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
sib-form-auto-completion,
|
||||
sib-form-checkbox,
|
||||
sib-form-dropdown,
|
||||
sib-form-label-text,
|
||||
sib-form-multiple-dropdown,
|
||||
sib-form-number,
|
||||
sib-form-textarea {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
>label {
|
||||
color: $color-244-10-70;
|
||||
font-weight: 600;
|
||||
margin: 2em 0 0.5em;
|
||||
text-transform: uppercase;
|
||||
|
||||
>div {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
select,
|
||||
textarea {
|
||||
background: $color-222-57-95;
|
||||
border: none;
|
||||
color: $color-233-18-29;
|
||||
line-height: 1.5;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
select,
|
||||
textarea {
|
||||
padding: 1.7rem;
|
||||
}
|
||||
|
||||
select {
|
||||
margin-bottom: 1.7rem;
|
||||
}
|
||||
}
|
||||
|
||||
sib-form-auto-completion,
|
||||
sib-form-checkbox,
|
||||
sib-form-multiple-dropdown {
|
||||
|
||||
label {
|
||||
color: $color-216-4-22;
|
||||
font-weight: 600;
|
||||
text-transform: initial;
|
||||
}
|
||||
}
|
||||
|
||||
sib-form-auto-completion {
|
||||
|
||||
div.choices__inner {
|
||||
background-color: inherit;
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
padding-left: 0;
|
||||
|
||||
div.choices__list {
|
||||
margin-top: 1.7rem;
|
||||
|
||||
div.choices__item {
|
||||
|
||||
button.choices__button {
|
||||
border-left: 1px solid $color-43-100-50;
|
||||
opacity: 1;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type='text'].choices__input {
|
||||
max-width: 27.2rem;
|
||||
min-width: 27.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sib-form-checkbox {
|
||||
flex-direction: row;
|
||||
|
||||
[type='checkbox'] {
|
||||
position: relative;
|
||||
margin-top: 2em;
|
||||
|
||||
&:before {
|
||||
border: 2px solid $color-210-5-56;
|
||||
content: '';
|
||||
height: 1rem;
|
||||
left: 0;
|
||||
margin-left: 1rem;
|
||||
padding-bottom: 0.2rem;
|
||||
position: absolute;
|
||||
width: 1.2rem;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
&:checked {
|
||||
&:before {
|
||||
border: 2px solid $color-210-5-56;
|
||||
color: $color-244-73-62;
|
||||
height: 1rem;
|
||||
left: 0;
|
||||
margin-left: 1rem;
|
||||
padding-bottom: 0.2rem;
|
||||
position: absolute;
|
||||
width: 1.2rem;
|
||||
z-index: 1;
|
||||
@include mdi('check');
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
background: $color-0-0-100;
|
||||
content: '';
|
||||
height: 1rem;
|
||||
position: absolute;
|
||||
width: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sib-form-dropdown {
|
||||
|
||||
select {
|
||||
appearance: none;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
background-image: url("/images/chevron-down.png");
|
||||
background-position: right 12px top 60%;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 14px 9px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
/* A REFACTORISER. PAS ENCORE UTILISE SUR L'APPLI */
|
||||
|
||||
sib-form-multiple-dropdown {
|
||||
|
||||
button {
|
||||
appearance: none;
|
||||
background-color: $color-0-0-100;
|
||||
border: 1px solid;
|
||||
border-radius: 100%;
|
||||
color: $color-244-73-62;
|
||||
font-size: 2.55rem;
|
||||
height: 1em;
|
||||
line-height: 0;
|
||||
margin: 0.34rem;
|
||||
padding: 0 0.04em 0.08em;
|
||||
vertical-align: middle;
|
||||
width: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
sib-form-textarea {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
sib-multiple-form {
|
||||
|
||||
>label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
input[type='submit'] {
|
||||
margin-top: 6rem;
|
||||
background-color: $color-233-18-29;
|
||||
color: $color-0-0-100;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
.is-horizontal {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
sib-multiple-form[name='members'] {
|
||||
|
||||
>div {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
>div:not(:nth-child(-n + 2)) {
|
||||
|
||||
label {
|
||||
|
||||
>div {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
appearance: none;
|
||||
background-color: $color-0-0-100;
|
||||
border: 1px solid;
|
||||
border-radius: 100%;
|
||||
color: $color-244-73-62;
|
||||
font-size: 2.55rem;
|
||||
height: 1em;
|
||||
line-height: 0;
|
||||
margin: 0.34rem;
|
||||
padding: 0 0.04em 0.08em;
|
||||
vertical-align: middle;
|
||||
width: 1em;
|
||||
|
||||
&::after {
|
||||
content: Add;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sib-form {
|
||||
|
||||
form > * {
|
||||
margin-top: 0.85rem;
|
||||
}
|
||||
|
||||
// button like
|
||||
input[type='color'],
|
||||
input[type='file'],
|
||||
input[type='reset'],
|
||||
input[type='submit'] {
|
||||
display: inline-block;
|
||||
padding: 0.85rem 2.55rem;
|
||||
border: none;
|
||||
border-radius: 100em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
input[type='reset'] {
|
||||
display: none;
|
||||
}
|
||||
}
|
207
src/styles/base/header.scss
Normal file
207
src/styles/base/header.scss
Normal file
@ -0,0 +1,207 @@
|
||||
#header {
|
||||
max-height: 51px;
|
||||
height: 51px;
|
||||
align-items: center;
|
||||
background-color: $color-0-0-100;
|
||||
color: $color-216-4-22;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.09);
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
padding: 1.6rem 0.64rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
> *:not(sib-widget) {
|
||||
padding: 0 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
#logo {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
#search-bar {
|
||||
position: relative;
|
||||
|
||||
#search-input {
|
||||
border-radius: 10em;
|
||||
padding: 0.64rem 1.28rem;
|
||||
border: 1px solid $color-215-9-73;
|
||||
height: 3.8rem;
|
||||
width: 28rem;
|
||||
-webkit-appearance: textfield;
|
||||
|
||||
& ~ #close-search-icon,
|
||||
& ~ #search-icon {
|
||||
color: $color-215-9-73;
|
||||
display: block;
|
||||
font-size: 1.7rem;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 3.7rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
-webkit-text-stroke: 1px $color-215-9-73;
|
||||
}
|
||||
|
||||
& ~ #close-search-icon {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
& ~ #close-search-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
& ~ #search-icon {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
details {
|
||||
cursor: pointer;
|
||||
|
||||
summary {
|
||||
|
||||
&::-moz-list-bullet {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
&::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
details {
|
||||
position: relative;
|
||||
|
||||
.sib-notifications__button {
|
||||
@include icon('bell');
|
||||
font-size: 3rem;
|
||||
|
||||
&::before {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sib-notifications__counter {
|
||||
left: 2.1rem;
|
||||
position: absolute;
|
||||
top: -3px;
|
||||
}
|
||||
}
|
||||
|
||||
.sib-notifications__list {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 5.6rem;
|
||||
}
|
||||
}
|
||||
|
||||
details#user-controls {
|
||||
|
||||
summary:focus {
|
||||
background-color: $color-233-18-29;
|
||||
color: $color-0-0-100;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#user-controls__profile {
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
|
||||
> * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 100%;
|
||||
height: 4.8rem;
|
||||
margin-right: 2rem;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
width: 4.8rem;
|
||||
}
|
||||
|
||||
sib-display-value[name='first_name'] {
|
||||
@include icon('arrow-down');
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 600;
|
||||
|
||||
&::before {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#user-controls__panel {
|
||||
height: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
|
||||
> nav {
|
||||
background-color: $color-0-0-100;
|
||||
box-shadow: 0 7px 8px 0 rgba(0, 0, 0, 0.16);
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 208px;
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
border-bottom: 1px solid $color-213-20-91;
|
||||
margin-right: 0;
|
||||
padding: 1.6rem 1.3rem;
|
||||
|
||||
a {
|
||||
color: $color-213-4-50;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
color: $color-213-4-50;
|
||||
padding: 1.6rem 1.3rem;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&[open] {
|
||||
background-color: $color-233-18-29;
|
||||
color: $color-0-0-100;
|
||||
|
||||
#user-controls__profile {
|
||||
|
||||
div {
|
||||
|
||||
sib-display-value[name='first_name'] {
|
||||
@include icon('close');
|
||||
|
||||
&::before {
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,14 @@ $breakpoints: (phone: 480px,
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
@ -76,39 +84,60 @@ button {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
sib-route,
|
||||
sib-link,
|
||||
button,
|
||||
input,
|
||||
a {
|
||||
cursor: pointer;
|
||||
&:hover,
|
||||
&:link,
|
||||
&:active {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
%padding-main {
|
||||
padding: 5rem;
|
||||
}
|
||||
|
||||
.padded-width {
|
||||
flex: 1;
|
||||
@extend %padding-main;
|
||||
}
|
||||
|
||||
.frame {
|
||||
.content-box {
|
||||
@include window-style-modal();
|
||||
@extend %padding-main;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
margin: 2rem 1rem 5rem 2rem;
|
||||
|
||||
&.full-width {
|
||||
background: $color-0-0-100;
|
||||
flex: 1;
|
||||
font-size: 1.5rem;
|
||||
margin: 0 auto;
|
||||
min-height: calc(100vh - 84px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dividing into columns */
|
||||
@mixin respond-to($breakpoint) {
|
||||
.backlink {
|
||||
font-size: 1.5rem;
|
||||
margin: 2rem 0 0 2rem;
|
||||
@include icon('arrow-left-circle');
|
||||
color: #3d4057;
|
||||
text-decoration: underline;
|
||||
|
||||
@if map-has-key($breakpoints, $breakpoint) {
|
||||
|
||||
@media (min-width: map-get($breakpoints, $breakpoint)) {
|
||||
@content;
|
||||
}
|
||||
&::before {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@else {
|
||||
@warn "Sorry, no value could be retrieved from `#{$breakpoint}`."
|
||||
+"Available breakpoints are: #{map-keys($breakpoints)}.";
|
||||
&::before {
|
||||
font-size: 2rem;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Compatibility layer for non-updated components
|
||||
@import 'compat';
|
||||
// Other base components
|
||||
@import 'form';
|
||||
@import 'header';
|
||||
@import 'menu-left';
|
120
src/styles/base/menu-left.scss
Normal file
120
src/styles/base/menu-left.scss
Normal file
@ -0,0 +1,120 @@
|
||||
#main__menu {
|
||||
background-color: $color-233-18-29;
|
||||
color: $color-0-0-100;
|
||||
display: block;
|
||||
overflow: auto;
|
||||
flex: 0 0 16em;
|
||||
transition: flex-basis 0.5s ease-in-out;
|
||||
|
||||
&.open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
sib-router {
|
||||
|
||||
.menu-wrapper {
|
||||
&.is-closed {
|
||||
.sub-menu {
|
||||
display: none;
|
||||
}
|
||||
.menu-chevron {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
font-weight: bold;
|
||||
padding: 1.6rem;
|
||||
|
||||
&[active] {
|
||||
background-color: $color-46-100-67;
|
||||
color: $color-233-18-29;
|
||||
|
||||
.menu-icon:before {
|
||||
background-color: $color-233-18-29;
|
||||
color: $color-0-0-100;
|
||||
}
|
||||
|
||||
.menu-notification > sib-display > div:first-child {
|
||||
background-color: $color-233-18-29;
|
||||
color: $color-46-100-67;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 1.7rem;
|
||||
width: 3.2em;
|
||||
|
||||
&:before {
|
||||
border-radius: 100%;
|
||||
height: 1.9em;
|
||||
line-height: 1.9em;
|
||||
width: 1.9em;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
font-weight: 600;
|
||||
justify-content: center;
|
||||
letter-spacing: 0.017rem;
|
||||
text-transform: uppercase;
|
||||
width: 8em;
|
||||
}
|
||||
|
||||
.menu-chevron {
|
||||
align-items: center;
|
||||
color: $color-244-10-70;
|
||||
display: flex;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
width: 2em;
|
||||
}
|
||||
|
||||
> sib-display {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
padding-left: 2.88rem;
|
||||
|
||||
div {
|
||||
color: $color-244-10-70;
|
||||
cursor: pointer;
|
||||
padding-bottom: 1.12rem;
|
||||
|
||||
div[name='project'] {
|
||||
display: flex;
|
||||
|
||||
sib-display-value {
|
||||
display: block;
|
||||
}
|
||||
|
||||
sib-display-div[name='dash'] {
|
||||
margin: 0 0.4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 1px;
|
||||
background-color: $color-213-13-86;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user