New content

Renamed many variables
New modules for special elements
Added demo content
This commit is contained in:
Stephan Hagedorn 2017-08-21 08:06:46 +02:00
parent 933806cb72
commit 9b2f7260ad
19 changed files with 1010 additions and 1081 deletions

View file

@ -1,28 +1,27 @@
// Clearing and floating
// General layout attributes
// ------------------------------------------------------------------------------
%size_content {
box-sizing: content-box;
}
.clear {
clear: both;
&::before,
&::after {
clear: both;
%size_content_solo {
@extend %size_content;
*,
::before,
::after {
box-sizing: $box_sizing;
}
}
.float_left {
float: left;
margin-right: $space_3;
%hidden {
display: none;
}
.overflow {
overflow: auto;
.magic {
@extend %hidden;
}
// General positioning attributes
// ------------------------------------------------------------------------------
.center_50 {
margin-right: 25%;
margin-left: 25%;
@ -38,27 +37,41 @@
margin-left: 0;
}
%size_content {
box-sizing: content-box;
.height_basic {
height: 1024px;
}
%size_content_solo {
@extend %size_content;
*,
::before,
::after {
box-sizing: $box_sizing;
// Clearing and floating
// ------------------------------------------------------------------------------
.clear {
clear: both;
&::before,
&::after {
clear: both;
}
}
.float_left {
float: left;
margin-right: $space_3;
}
.overflow {
overflow: auto;
}
.x_long {
overflow-x: scroll;
}
// Structure attributes
// Positioned elements
// ------------------------------------------------------------------------------
%full_viewport {
position: absolute;
position: fixed;
top: 0;
left: 0;
width: 100vw;
@ -68,32 +81,87 @@
%full_parent {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
// width: 100%;
// height: 100%;
}
.pos_abs {
position: absolute;
}
// Fixed elements
.pos_rel {
position: relative;
}
.pos_fix {
position: fixed;
}
.pos_bottom {
bottom: 0;
}
// Absolute elements
.pos_full_view {
@extend %full_viewport;
background-color: rgba($alpha_color, .5);
}
.pos_full_page {
@extend %full_parent;
background-color: rgba($charlie_color, .25);
}
.hover_back_change {
background-color: darken($basic_back_color, 10%);
transition: background-color .2s ease-in-out;
&:hover {
background-color: $basic_back_color;
}
}
.hover_full_view_change {
@extend %full_viewport;
z-index: $z_top;
background-color: transparentize($dark_color, .5);
transition: background-color .2s ease-in-out;
pointer-events: none;
}
.flex {
display: flex;
}
.flex_child {
flex: 0 1 auto;
}
// Colors
// ------------------------------------------------------------------------------
.txt_light_color {
color: darken($basic_back_color, 10%);
}
// Input
// ------------------------------------------------------------------------------
%default_button {
display: inline-block;
padding: $basic_padding;
background-color: transparentize($basic_link_color, .8);
border-radius: $basic_corner;
&:active,
&:focus,
&:hover {
background-color: rgba($basic_highlight_color, .1);
color: $basic_highlight_color;
border-color: transparent;
}
}

79
basic/_demo.scss Normal file
View file

@ -0,0 +1,79 @@
.demo__intro {
@extend .sec__main_center;
border-top-width: $border_width_8;
border-top-style: solid;
border-color: $basic_border_color;
padding-top: $space_3;
}
.demo__header {
padding: $space_2;
nav {
ul {
margin: 0;
}
}
}
.header__fancy {
background-color: transparentize($bravo_color, .4);
nav {
a {
background-color: transparentize($alpha_color, .4);
color: $alpha_color;
&:active,
&:focus,
&:hover {
background-color: rgba($bright_color, .2);
color: $bright_color;
}
}
}
}
.header__fix {
position: relative;
top: 0;
width: 100%;
background-color: transparentize($charlie_color, .4);
nav {
a {
&:active,
&:focus,
&:hover {
background-color: rgba($bright_color, .2);
color: $bright_color;
}
}
}
}
.demo__footer {
width: 100%;
height: 128px;
background-color: $dark_color;
color: $bright_color;
}
.demo__avatar {
img {
opacity: 1;
width: 128px;
height: auto;
border-radius: 50%;
background-color: $delta_color;
}
}
.demo__flag {
height: 40vh;
}

View file

@ -14,7 +14,7 @@ p {
}
.p__col_line {
column-rule: $basic_border_width solid $black;
column-rule: $basic_border_width solid $dark_color;
}
.p__col_2, .p__col_3 {
@extend p;
@ -38,7 +38,7 @@ hr {
margin: $space_3 auto;
border-width: $basic_border_width 0 0;
border-style: solid;
border-color: $black;
border-color: $dark_color;
}
.hr__hidden {
@ -57,12 +57,13 @@ pre {
}
.pre__code {
border-color: rgba($white,.1);
// overflow-x: scroll;
border-color: rgba($bright_color,.1);
border-style: dotted;
border-width: 0 0 0 $border_width_4;
border-radius: $basic_corner;
padding: $basic_space;
background-color: rgba($white,.1);
background-color: rgba($bright_color,.1);
code {
background-color: transparent;
}
@ -124,6 +125,36 @@ ul {
}
}
.list__link {
li {
margin-bottom: $tiny_space * 2;
text-transform: uppercase;
a {
display: block;
padding: $basic_padding;
color: $basic_font_color;
img {
margin-right: $basic_space;
padding-bottom: .2em;
vertical-align: text-bottom;
}
&:active,
&:focus,
&:hover {
background-color: $basic_action_color;
color: $basic_highlight_color;
}
}
}
}
.list__horizontal {
overflow: auto;
li {
@extend .float_left;
}
}
// Embedded
figure {
margin: $space_2 $basic_indent;
@ -146,39 +177,35 @@ div {
}
.box__screen {
width: $basic_width;
@media screen and (orientation: landscape) {
@media (min-width: $screen_small) {
width: $width_2;
}
@media (min-width: $screen_medium) {
width: $width_3;
}
@media (min-width: $screen_large) {
width: $width_4;
}
}
@media screen and (orientation: portrait) {
@media (min-width: $screen_small) {
width: $width_2;
}
}
margin: 0 auto;
border-top-width: $border_width_8;
border-top-style: solid;
border-color: $basic_border_color;
padding-top: $space_3;
}
.box__info {
padding: $space_2 $basic_indent;
border-right: $basic_space solid rgba($echo_color, .6);
background-color: rgba($echo_color, .1) !important;
}
.box__main_indent {
margin-left: 25%;
}
.box__full_width {
// position: relative;
// overflow: hidden;
// width: 100%;
}
// Inline
.box__inline_left {
@extend .float_left;
// padding: $basic_space / 2;
}
// Space and placeholders
.box__space {
position: relative;
width: 100%;
}
.box__cube {
float: left;
display: table;
width: $space_4;
@ -192,21 +219,22 @@ div {
.box__placeholder {
width: 100%;
height: $space_4;
border: $border_width_4 solid rgba($black,.1);
border: $border_width_4 solid rgba($dark_color,.1);
border-radius: $basic_corner;
padding: $basic_space;
background-color: rgba($black,.1);
background-color: rgba($dark_color,.1);
svg {
vertical-align: top;
}
}
.box__placeholder_bkg {
width: 100%;
height: $space_4;
border: $border_width_4 solid rgba($black,.1);
border: $border_width_4 solid rgba($dark_color,.1);
border-radius: $basic_corner;
padding: $basic_space;
/*data:[<mime type>][;charset=<charset>][;base64],<encoded data>*/
background: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0' y='0' width='100%' height='100%'><line x1='2%' y1='2%' x2='98%' y2='98%' stroke='#000' stroke-width='.5'/><line x1='0' y1='100%' x2='100%' y2='0' stroke='#000' stroke-width='.5'/></svg>") no-repeat;
background-color: rgba($black,.1);
background-color: rgba($dark_color,.1);
}

View file

@ -37,8 +37,8 @@ label {
color: $basic_io_font_color;
&:hover {
background-color: $black;
color: $white;
background-color: $dark_color;
color: $bright_color;
}
}
}

View file

@ -12,6 +12,7 @@ html {
// -----------------------------------------------------------------------------
body {
position: relative;
box-sizing: $box_sizing;
font-family: $primary_font_family;
font-size: $basic_size;
@ -24,6 +25,11 @@ body {
::after {
box-sizing: inherit;
}
&:hover {
.trigger__hover {
background-color: transparent;
}
}
}
article {
@ -34,14 +40,39 @@ section {
}
aside.right + section {
margin-right: calc(#{$basic_aside_width} + #{$basic_space});
.sec__main_center {
width: $basic_width;
@media screen and (orientation: landscape) {
@media (min-width: $screen_small) {
width: $width_small;
}
@media (min-width: $screen_medium) {
width: $width_medium;
}
@media (min-width: $screen_large) {
width: $width_large;
}
}
@media screen and (orientation: portrait) {
@media (min-width: $screen_small) {
width: $width_small;
}
}
margin: 0 auto;
padding-top: $space_3;
}
aside.left + section {
margin-left: calc(#{$basic_aside_width} + #{$basic_space});
aside {
&.right + section {
margin-right: calc(#{$basic_aside_width} + #{$basic_space});
}
&.left + section {
margin-left: calc(#{$basic_aside_width} + #{$basic_space});
}
}
nav {
}
@ -63,6 +94,10 @@ header {
}
.header__page {
overflow: auto;
}
footer {
}

View file

@ -3,13 +3,13 @@
a {
color: $basic_link_color;
// color: lighten($basic_action_color, 20%);
// color: lighten($basic_action_color, 20%);
text-decoration: none;
&:active,
&:focus,
&:hover {
color: $basic_highlight_color;
color: $basic_highlight_color;
}
}
@ -24,11 +24,23 @@ a {
&:active,
&:focus,
&:hover {
background-color: $basic_action_color;
color: $basic_highlight_color;
background-color: $basic_action_color;
color: $basic_highlight_color;
}
}
.a__button {
@extend %default_button;
}
.a__button_border {
@extend %default_button;
padding: $wide_padding;
background-color: transparent;
color: $basic_font_color;
border: $cell_border;
}
// Other elements
@ -76,7 +88,7 @@ time {
code {
@extend %basic_mono;
color: lighten($basic_font_color, 12%);
background-color: rgba($white,.1);
background-color: rgba($bright_color,.1);
}
.code__solo {
@extend %basic_mono;
@ -106,15 +118,15 @@ mark {
}
.mark__cursor {
color: $basic_highlight_color;
background-color: $black;
background-color: $dark_color;
}
::-moz-selection {
color: $basic_highlight_color;
background-color: $black;
background-color: $dark_color;
}
::selection {
color: $basic_highlight_color;
background-color: $black;
background-color: $dark_color;
}
span {