@onenexus/cell
Version:
Style BEM DOM elements using Sass
771 lines (767 loc) • 14.7 kB
CSS
@import url(https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700);
.container:after,
.header:after,
.searchbar:after {
content: "";
display: table;
clear: both
}
.visually-hidden {
width: 1px;
height: 1px;
position: absolute;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
border: 0;
}
.sidebar__title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
code[class*='language-'],
pre[class*='language-'] {
color: black;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}
pre[class*='language-']::-moz-selection,
pre[class*='language-']::-moz-selection,
code[class*='language-']::-moz-selection,
code[class*='language-']::-moz-selection {
text-shadow: none;
background: #b3d4fc
}
pre[class*='language-']::selection,
pre[class*='language-']::selection,
code[class*='language-']::selection,
code[class*='language-']::selection {
text-shadow: none;
background: #b3d4fc
}
@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none
}
}
pre[class*='language-'] {
padding: 1em;
margin: .5em 0;
overflow: auto
}
:not(pre)>code[class*='language-'],
pre[class*='language-'] {
background: white
}
:not(pre)>code[class*='language-'] {
padding: .1em;
border-radius: .3em
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray
}
.token.punctuation {
color: #999
}
.namespace {
opacity: .7
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
color: #905
}
.token.selector,
.token.attr-name,
.token.string,
.token.builtin {
color: #690
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #a67f59;
background: rgba(255, 255, 255, 0.5)
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a
}
.token.regex,
.token.important {
color: #e90
}
.token.important {
font-weight: bold
}
.token.entity {
cursor: help
}
html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
*,
*::after,
*::before {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit
}
body {
font: 1em/1.35 "Roboto", "Helvetica Neue Light", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
overflow: auto;
margin: 0
}
a {
transition: 0.15s;
text-decoration: none;
color: #333;
}
a:hover,
a:hover code {
color: #2196F3;
}
table p {
margin: 0 0 0.5rem
}
:not(pre)>code {
color: tomato;
white-space: nowrap;
font-weight: normal
}
:not(pre)>code:hover {
color: black ;
}
@media (max-width: 800px) {
table,
tbody,
tr,
td,
th {
display: block
}
thead {
width: 1px;
height: 1px;
position: absolute;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
border: 0
}
tr {
padding-bottom: 1em;
margin-bottom: 1em;
border-bottom: 2px solid #ddd
}
td::before,
th::before {
content: attr(data-label)": ";
text-transform: capitalize;
font-weight: bold
}
td p,
th p {
display: inline
}
}
.layout-toggle {
display: none
}
@media (min-width: 801px) {
.layout-toggle {
position: absolute;
top: 8px;
left: 20px;
font-size: 2em;
cursor: pointer;
color: #1565C0;
display: block
}
.layout-toggle:hover {
color: #0D47A1;
}
}
@media (min-width: 801px) {
.sidebar-closed .sidebar {
-webkit-transform: translateX(-280px);
-ms-transform: translateX(-280px);
transform: translateX(-280px)
}
.sidebar-closed .main {
padding-left: 0
}
.sidebar-closed .header {
left: 0
}
}
.list-unstyled {
padding-left: 0;
list-style: none;
line-height: 1.5;
margin-top: 0;
margin-bottom: 1.5rem
}
.list-inline li {
display: inline-block
}
.container {
max-width: 100%;
width: 1170px;
margin: 0 auto;
padding: 0 2rem
}
.relative {
position: relative
}
.clear {
clear: both
}
.header {
position: fixed;
top: 0;
right: 0;
left: 280px;
padding: 1em 0;
background: #2196F3;
color: #e0e0e0;
z-index: 4000
}
@media (max-width: 800px) {
.header {
left: 0
}
}
@media (min-width: 801px) {
.header {
transition: 0.2s cubic-bezier(0.215, 0.61, 0.355, 1)
}
}
.header__title {
font-weight: 500;
text-align: center;
margin: 0 0 0.5em 0
}
.header__title a {
color: #e0e0e0
}
@media (min-width: 801px) {
.header__title {
float: left;
font-size: 1em;
margin-top: .25em;
margin-bottom: 0
}
}
.searchbar {
display: inline-block;
float: right
}
@media (max-width: 800px) {
.searchbar {
display: block;
float: none
}
}
.searchbar__form {
float: right;
position: relative
}
@media (max-width: 800px) {
.searchbar__form {
float: none
}
}
@media (min-width: 801px) {
.searchbar__form {
min-width: 15em
}
}
.searchbar__field {
border: none;
padding: 0.5em 0;
font-size: 1em;
margin: 0;
width: 100%;
color: #FFF;
outline: none;
background-color: transparent;
border-bottom: 1px solid rgba(255,255,255,.7);
}
.searchbar__field::-webkit-input-placeholder
{
color: rgba(255,255,255,.7);
}
.searchbar__suggestions {
position: absolute;
top: 100%;
right: 0;
left: 0;
box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.24), 0 1.5px 6px rgba(0, 0, 0, 0.12);
border: 1px solid #e0e0e0;
background: white;
padding: 0;
margin: 0;
list-style: none;
z-index: 2
}
.searchbar__suggestions:empty {
display: none
}
.searchbar__suggestions .selected {
background: #ddd
}
.searchbar__suggestions li {
border-bottom: 1px solid #e0e0e0
}
.searchbar__suggestions li:last-of-type {
border: none
}
.searchbar__suggestions a {
display: block;
padding: 0.5em;
font-size: 0.9em
}
.searchbar__suggestions a:hover,
.searchbar__suggestions a:active,
.searchbar__suggestions a:focus {
background: #e0e0e0
}
.searchbar__suggestions code {
margin-right: .5em
}
@media (min-width: 801px) {
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
overflow: auto;
width: 280px;
z-index: 2;
border-right: 1px solid #e0e0e0;
transition: 0.2s cubic-bezier(0.215, 0.61, 0.355, 1)
}
}
@media (max-width: 800px) {
.sidebar {
margin-top: 4em
}
}
.sidebar__annotation {
color: #5c4863
}
.sidebar__item {
font-size: 0.9em
}
.sidebar__item a {
padding: 0.5em 4.5em;
display: block;
text-decoration: none;
color: #555
}
.sidebar__item:hover,
.sidebar__item:active,
.sidebar__item:focus {
background: #EEE;
color: #333;
}
.sidebar__item.is-collapsed+* {
display: none
}
.sidebar__item--heading {
padding: 1em 1.5em
}
.sidebar__item--heading a {
font-weight: bold
}
.sidebar__item--sub-heading {
padding: 0.5em 2.5em
}
.sidebar__item--sub-heading a {
color: #888
}
.sidebar__item--heading,
.sidebar__item--sub-heading {
position: relative
}
.sidebar__item--heading:after,
.sidebar__item--sub-heading:after {
position: absolute;
top: 50%;
right: 2em;
content: '\25BC';
margin-top: -0.5em;
color: #ddd;
font-size: 0.7em
}
.sidebar__item--heading.is-collapsed:after,
.sidebar__item--sub-heading.is-collapsed:after {
content: '\25B6'
}
.sidebar__item--heading a,
.sidebar__item--sub-heading a {
padding: 0;
display: inline
}
.sidebar__description {
color: #e0e0e0;
padding-right: 2em
}
.sidebar__header {
border-bottom: 1px solid #e0e0e0
}
.sidebar__title {
font-size: 1em;
margin: 0;
padding: 1.45em
}
.btn-toggle {
background: #EFEFEF;
border: none;
border-bottom: 1px solid #e0e0e0;
display: block;
padding: 1em;
width: 100%;
cursor: pointer;
color: #999;
font-weight: bold;
margin: 0;
transition: 0.15s ease-out;
outline: none;
}
.btn-toggle:hover,
.btn-toggle:active,
.btn-toggle:focus {
background: #EEE;
color: #333;
}
.main {
background: #f9f9f9;
position: relative
}
@media (min-width: 801px) {
.main {
transition: 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
padding-left: 280px;
padding-top: 4em;
min-height: 45em
}
}
.main__section {
margin-top: 5em;
}
.header+.main__section {
margin-top: 0;
border-top: none
}
.main__heading,
.main__heading--secondary {
padding: 1em 0;
margin-top: 0
}
@media (min-width: 801px) {
.main__heading,
.main__heading--secondary {
padding: 2em 0 0
}
}
.main__heading {
color: #fff;
font-size: 3.5em;
text-align: center;
padding-bottom: .5em;
margin-bottom: 1em;
background: #2196F3;
text-align: left;
font-weight: 100;
}
.main__heading--secondary {
font-size: 2.75em;
color: #2196F3;
font-weight: 100;
padding-top: 0;
padding-bottom: .5em;
margin-bottom: -2rem;
position: relative;
border-bottom: 1px solid #ddd;
}
.main__heading--secondary .container {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis
}
.main__heading--secondary::before {
/*content: '';
position: absolute;
left: 0;
right: 0;
bottom: 0.15em;
height: 0.2em;
background-color: #dd5a6f*/
}
.footer {
background: #e0e0e0;
padding: 1em 0
}
.footer .container {
position: relative
}
.footer__project-info {
float: left
}
.footer__watermark {
position: absolute;
right: 0;
top: -0.7em
}
.footer__watermark img {
display: block;
max-width: 7em
}
.project-info__name,
.project-info__version,
.project-info__license {
display: inline-block
}
.project-info__version,
.project-info__license {
color: #555
}
.project-info__license {
text-indent: -0.25em
}
.main__section {
margin-bottom: 4.5rem
}
.main__sub-section:after {
border-bottom: 1px solid #EEE;
content: '';
display: block;
padding-top: 10%;
margin-bottom: 10%;
width: 100%;
}
.item__heading {
color: #333;
margin: 4.5rem 0 1.5rem 0;
position: relative;
font-size: 2em;
font-weight: 300;
float: left
}
.item__name {
color: #333;
}
.item__example {
margin-bottom: 1.5rem
}
.item__example,
.item__code {
border: 1px solid #e0e0e0;
word-wrap: break-word;
line-height: 1.42
}
.item__code {
padding-right: 7em;
clear: both;
cursor: pointer;
transition: box-shadow .2s ease;
}
.item__code:hover {
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
border: 1px solid #BCBCBC;
}
.item__code--togglable::after {
position: absolute;
right: 0;
bottom: -2.5em;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
opacity: 0;
color: #c4c4c4;
font-size: 0.8em;
transition: 0.2s ease-out
}
.item__code--togglable:hover::after,
.item__code--togglable:active::after,
.item__code--togglable:focus::after {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
opacity: 1
}
.item__code--togglable[data-current-state='expanded']::after {
content: 'Click to collapse.'
}
.item__code--togglable[data-current-state='collapsed']::after {
content: 'Click to expand.'
}
.example__description {
padding: 1em;
background: #EFEFEF
}
.example__description p {
margin: 0
}
.example__code[class*='language-'] {
margin: 0
}
.item__anchor {
font-size: 0.6em;
color: #eeafb9
}
@media (min-width: 801px) {
.item__anchor {
position: absolute;
right: 101%;
bottom: 0.25em;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
opacity: 0
}
.item:hover .item__anchor {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
opacity: 1
}
}
.item__deprecated {
display: inline-block;
overflow: hidden;
margin-top: 5.5em;
margin-left: 1em
}
.item__deprecated strong {
float: left;
color: #c00;
text-transform: uppercase
}
.item__deprecated p {
float: left;
margin: 0;
padding-left: 0.5em
}
.item__type {
color: #ddd;
text-transform: capitalize;
font-size: 0.75em
}
.item__alias,
.item__aliased {
color: #ddd;
font-size: 0.8em
}
.item__sub-heading {
color: #333;
margin-top: 1.5rem;
margin-bottom: 1rem;
font-size: 1em
}
.item__parameters {
width: 100%;
margin-bottom: 1em;
border-collapse: collapse
}
.item__parameters thead th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
border-top: none;
text-align: left;
color: #707070
}
.item__parameters tbody th {
text-align: left
}
.item__parameters td,
.item__parameters th {
padding: 0.5em 0.5em 0.5em 0;
vertical-align: top
}
@media (min-width: 801px) {
tbody>.item__parameter:first-of-type>td {
border-top: none
}
.item__parameters td,
.item__parameters th {
border-top: 1px solid #ddd
}
}
.item__access {
text-transform: capitalize;
color: #5c4863;
font-size: 0.8em
}
.item__since {
float: right;
padding-top: 0.9em;
color: #c4c4c4;
margin-bottom: 1em
}
.item__source-link {
position: absolute;
top: 1px;
right: 1px;
background: white;
padding: 1em;
z-index: 2;
color: #c4c4c4
}
.item__cross-type {
color: #4d4d4d;
font-family: 'Consolas', 'Monaco', 'Andale Mono', monospace;
font-size: 0.8em
}
.item__description {
margin-bottom: 1.5rem
}
li.item__description {
margin-bottom: 0
}
.item__description--inline>* {
display: inline-block;
margin: 0
}
.item__code-wrapper {
position: relative;
clear: both;
margin-bottom: 1.5rem
}
.color-preview--inline {
padding: 2px 4px;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 3px
}
.color-preview--block {
width: 2em;
height: 2em;
position: absolute;
top: 140%;
right: 0;
top: calc(100% + 20px);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 3px
}