NxTIC/css/global.scss

233 lines
3.7 KiB
SCSS
Raw Normal View History

/* [1] Panneau d'ajout/suppression d'elements
=========================================================*/
section[data-panel-list]{
display: block;
position: relative;
border-radius: 3px;
border: 1px solid #ccc;
background-color: #fff;
font-size: .8em;
/* (1) Header (titre + ajout) */
& > div[data-header]{
display: flex;
position: relative;
// flex properties
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
padding: .5em .7em;
border-radius: 3px 3px 0 0;
border-bottom: 1px solid #ccc;
background-color: #f5f5f5;
box-shadow: inset 0 0 5px #eee;
// Libelle du panel
& > span,
& > button{
color: #333;
font-weight: bold;
line-height: 2em;
}
// Bouton ajouter
& > button{
padding: .1em .7em;
border-radius: 3px;
border: 1px solid #555;
background: #f5f5f5;
transition: all .2s ease-in-out;
// Animation de @hover
&:hover{
background: #333;
color: #fff;
}
}
}
/* (2) Description (sous le header) */
& > div[data-description]{
display: block;
position: relative;
border-bottom: 1px solid #ccc;
padding: .7em .7em;
color: #666;
}
/* (3) Liste des elements */
& > ul[data-list]{
display: flex;
position: relative;
// flex properties
flex-direction: column;
justify-content: flex-start;
flex-wrap: nowrap;
margin: 0;
padding: 0;
list-style: none;
/* (4) Chaque element de la liste */
& > li[data-element]{
display: flex;
// flex properties
flex-direction: row;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
padding: .2em 1em;
// rebord en bas sauf dernier
&:not(:last-child){
border-bottom: 1px solid #ccc;
}
/* (4.1) Logo et type d'element */
& > div:nth-child(1){
display: flex;
width: 10em;
height: 6em;
// flex properties
flex-direction: column;
justify-content: flex-end;
align-items: center;
background: url('/f/svg/token/st/container/666666') center 1em no-repeat;
background-size: auto 50%;
// Si le token est actif
&.active{
background-image: url('/f/svg/token/st/container/4cbf86');
}
// Texte pour le type d'element
& > span{
display: block;
padding: 0 .4em;
border-radius: 3px;
border: 1px solid #ddd;
font-size: .8em;
color: #666;
text-transform: uppercase;
font-weight: bold;
}
}
/* (4.2) Donnees descriptives */
& > div:nth-child(n+2){
display: flex;
position: relative;
flex: 10em;
padding: 1em;
// flex properties
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
font-size: .9em;
color: #666;
font-weight: bold;
// On prefixe chaque donnee
& > span[data-prefix]:before{
content: attr(data-prefix) ": ";
font-weight: normal;
}
}
/* (4.3) Bouton de suppression */
& > button{
padding: .1em .7em;
height: 2em;
border-radius: 3px;
border: 1px solid #de2b08;
background: #fff;
color: #de2b08;
font-weight: bold;
transition: all .2s ease-in-out;
// Animation de @hover
&:hover{
background: #de2b08;
color: #fff;
}
}
}
}
2016-04-10 16:27:38 +00:00
/* (5) Formulaire d'ajout d'un nouvel element */
& > div[data-add]{
display: none;
// Affichage quand .active
&.active{
display: block;
}
position: relative;
padding: 1em;
border-top: 1px solid #ccc;
background-color: #f5f5f5;
font-weight: bold;
/* (5.1) Champs de texte */
& > input[type='text']{
margin: 1em 0;
padding: .3em .5em;
border-radius: 3px;
border: 1px solid #999;
background-color: #fff;
color: #000;
font-weight: normal;
}
}
}