NxTIC/css/global.scss

189 lines
3.2 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 #ddd;
background: linear-gradient(#fcfcfc, #eee);
// Animation de @hover
&:hover{
background: linear-gradient(#fcfcfc, #ddd);
}
}
}
/* (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: 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%;
// 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{
border-color: #de2b08;
background: #de2b08;
color: #fff;
}
}
}
}
}