@import '../constants'; /* [3] Card style -> container ---------------------------------*/ #CONTAINER.card > div.card.container{ order: 2; flex: 1 0 calc( 100% - 20em ); display: flex; min-height: 100%; // flex properties flex-direction: row; justify-content: flex-start; align-items: stretch; align-content: flex-start; flex-wrap: wrap; margin: .5em; z-index: 101; overflow: auto; /* [3.1] Card style -> instant-search ---------------------------------*/ & > input.instant-search{ display: inline-block; position: relative; flex: 1 0 80%; // 70% to almost fill the line height: 1.2em; margin: .5em; padding: .5em 1em; margin-right: 0; border-radius: 3px / 3px; background-color: #fff; box-shadow: 0 2px 2px darken(#fff, 10%); & + button.card.toggle{ display: inline-block; position: relative; flex: 0 0 calc( 2em - 2*.5em ); margin: .5em; color: transparent; font-weight: bold; background: #fff url('/asset/svg/plus.svg@#{$rd-form-valid-color}') center center no-repeat; background-size: 40% auto; } } /* (1) Card container */ & > section{ flex: 1 1 20em; display: flex; position: relative; margin: .5em; padding: 1.5em; border-radius: 3px / 3px; border: 1px solid transparent; box-shadow: 0 1px 1px darken(#fff, 20%); &.invalid{ box-shadow: 0; border: 1px solid $form-invalid-color; } &.valid{ box-shadow: 0; border: 1px solid $form-valid-color; } &.search{ box-shadow: 0; border: 1px solid $form-search-color; } background-color: #fff; color: $primary-color; // flex flex-direction: column; justify-content: space-between; flex-wrap: nowrap; z-index: 102; &[data-create]{ border: 1px solid $form-valid-color; } // hidden mode &.search-hidden, &.filter-hidden{ display: none; } /* (2) REMOVE+EDIT+ADMIN button */ & > div.goo-menu{ $btn-size: 1.8em; $btn-space: 0em; $nb-btn: 4; $nb-spc: $nb-btn - 1; $cont-w: $btn-size * $nb-btn + $nb-spc * $btn-space; display: inline-block; position: absolute; top: 1em; left: calc( 100% - 1em - #{$btn-size} - .5em ); width: $btn-size; height: $btn-size; -webkit-filter: url('/asset/svg/filter.svg#goo-menu') drop-shadow(-5px 0 0 #fff); filter: url('/asset/svg/filter.svg#goo-menu') drop-shadow(-5px 0 0 #fff); cursor: pointer; z-index: 103; /* (2.1) Pan all on hover */ &:hover{ left: calc( 100% - 1em - #{$cont-w} - .5em - 1em ); width: calc( #{$cont-w} + 1em ); /* (2.1.1) lighter color on hover */ & > div.remove[data-remove], & > div.edit[data-edit], & > div.enabled[data-enabled], & > div.required[data-required], & > div.admin[data-admin]{ background-color: darken(#fff, 12%); /* (2.1.2) displace all but 1st element */ &.edit[data-edit]{ left: calc( 100% - #{$btn-size * 2 + $btn-space} ); } &.remove[data-remove]{ left: calc( 100% - #{$btn-size * 3 + $btn-space * 2} ); } &.required[data-required]{ left: calc( 100% - #{$btn-size * 4 + $btn-space * 3} ); } } } /* (2.2) Design elements */ & > div.remove[data-remove], & > div.edit[data-edit], & > div.enabled[data-enabled], & > div.required[data-required], & > div.admin[data-admin]{ display: inline-block; position: absolute; top: 0; left: calc( 100% - #{$btn-size} ); width: $btn-size; height: $btn-size; border-radius: 50%; transition: background-color .1s ease-in-out, left .2s ease-in-out; background: #fff url('/asset/svg/cross.svg@aaaaaa') center center no-repeat; background-size: auto 50%; cursor: pointer; z-index: 103; /* (2.1) Feedback */ &:hover{ background-image: url('/asset/svg/cross.svg@#{$rd-form-invalid-color}'); } /* (2.2) EDIT button */ &.edit[data-edit]{ background-image: url('/asset/svg/a.svg@aaaaaa'); background-size: auto 60%; z-index: 104; &:hover{ background-image: url('/asset/svg/a.svg@#{$rd-form-search-color}'); } } /* (2.3) ADMIN switch */ &.admin[data-admin]{ background-image: url('/asset/svg/admin-disabled.svg@aaaaaa'); z-index: 105; &:hover{ background-image: url('/asset/svg/admin-disabled.svg@555555'); } &[data-active='1']{ background-image: url('/asset/svg/admin.svg@f4bd18'); } &[data-active='1']:hover{ background-image: url('/asset/svg/admin.svg@f4a118'); } } /* (2.3) DISABLED switch */ &.enabled[data-enabled]{ background-image: url('/asset/svg/bell-disabled.svg@aaaaaa'); z-index: 105; &:hover{ background-image: url('/asset/svg/bell-disabled.svg@555555'); } &[data-active='1']{ background-image: url('/asset/svg/bell.svg@f4bd18'); } &[data-active='1']:hover{ background-image: url('/asset/svg/bell.svg@f4a118'); } } /* (2.4) REQUIRED switch */ &.required[data-required]{ background-image: url('/asset/svg/pin-disabled.svg@aaaaaa'); z-index: 104; &:hover{ background-image: url('/asset/svg/pin-disabled.svg@555555'); } &[data-active='1']{ background-image: url('/asset/svg/pin.svg@ea4b35'); } &[data-active='1']:hover{ background-image: url('/asset/svg/pin.svg@c44130'); } } } } /* (4) Card generic title */ & > span.category, & > select.category{ display: block; position: relative; width: calc( 100% - 1em ); margin-bottom: .5em; font-size: .7em; color: darken($secondary-color, 10%); text-transform: uppercase; letter-spacing: .05em; z-index: 102; } /* (4-edit) Card generic title (select) */ & > select.category{ width: calc( 100% + 1em ); height: 3em; margin: 0; padding: 0; margin-left: -.4em; // emulate no