/* ###################################################### #### VARIABLES - USE these for easier future changes ####################################################### */ @import '_default-variables.scss'; @import '_dynamic-variables.scss'; @import '_mixins.scss'; /* ##################################################### #### ALL DEFAULT VARIABLES IN scss-imports/_default-variables.scss #### MIXINS IN scss-imports/_mixins.scss ######################################################## */ /* Some variables that depend on variables from default or dynamic stylesheets */ $theme-color-dark: darken($theme-color, 20%); /* Theme color dark (darkens theme color all by itself, or you can replace with a value) */ $theme-color-complement: lighten($theme-color, 20%); /* Complementary theme color */ $phone-menu: setContrastColor($theme-color, #fff); /* Phone menu button */ /* ############################################################################################################### ########## THE FULL CODE ############################################################################################################### */ body { overflow-y: scroll; background: $background; max-width: 100%; word-wrap: break-word; color: $text-color-dark; font-family: $cfont; font-size: $fsize; line-height: $flheight; a { color: $link-color; /* Link color */ text-decoration: none; } a:hover{ @if(lightness($theme-color) > 70) { color: darken($theme-color, 30%); } @else { color: lighten($theme-color, 10%); } text-decoration: underline; } } /* H1 is super, all other headings extend h1 */ h1 { font-weight: $tweight; font-size: $tfsize; line-height: $tlheight; font-family: $tfont; color: $title-color; a{ color: $title-color; } a:hover{ @if(lightness($theme-color) > 70) { color: darken($theme-color, 30%); } @else { color: lighten($theme-color, 10%); } text-decoration: none; } } @for $i from 2 through 4 { h#{$i} { @extend h1; $tfsize: $tfsize * 0.85; font-size: $tfsize; } } @for $i from 5 through 6 { h#{$i} { @extend h4; $tfsize: $tfsize * 0.9; font-size: $tfsize; } } /* ############################ #### Helpers ############################## */ /* Margin bottom for quite a few elements */ p, ul, ol, h1, h2, h3, h4, h5, h6, table, figure, form, fieldset, blockquote, article, adress, .widget, .sircon-byline, .sircon-simple-slideshow{ margin:0 0 $cmargin; } /* Make an element be non-visible without actually being set as invisible */ .push-away{ position:absolute; top:100%; height:0; overflow:hidden; } /* Clearfix! Fixes inner-floating-missing-height problem */ .max, .read-max, .columns, .clear{ clear:both; &:before { @include clearBeforeAfter(); /* Clears them all */ } &:after { @include clearBeforeAfter(); /* Clears them all */ } } /* Generic Screenreader visibility */ .screen-reader-response, /* Contact form 7 uses this selector */ .screen-reader-text, .screenreader-only{ position:absolute; top:0; left:0; opacity:0; z-index:-99999; pointer-events:none; } /* Some text content not to be displayed */ .ir{ overflow:hidden; &:before { content:" "; display:block; height:150%; } } /* Layout never wider than this */ .max { max-width: $max; position: relative; margin: auto; padding: 0px 10px; } /* And max height for a few elements... */ #top >.max, #bottom >.max{height:100%;} /* Prepared in case of fantastic background */ .ajax-loading #sirconajax-background-image .featured-image{opacity:0.6} /* ###################################### ##### Preset padding classes - may help provide equal amount of space all over the website, if used. ######################################### */ .pad{padding:$cpadding;} .pad-top{padding-top:$cpadding;} .pad-bottom{padding-bottom:$cpadding;} .pad-left{padding-left:$cpadding;} .pad-right{padding-right:$cpadding;} .pad-vertical{ padding-top:$cpadding; padding-bottom:$cpadding; } .pad-horisontal{ padding-left:$cpadding; padding-right:$cpadding; } /* ############################## ###### READ MAX - Readable text content ################################*/ .read-max { > * { max-width: $read-max; /* Limited by the read-max value */ } .ovverride-read-max, figure { /* Figures and some other elements can become fullwidth */ max-width: 100%; } > pre { overflow: auto; display: block; background:#FFF; color:#000; padding:10px; border:1px solid #bbb; font:14px/1.6 lucida console, sans-serif; } } /* ############################## ###### GENERAL ################################*/ /* Makes mobile-only elements display, desktop-only elements won't */ .desktop-only{display:none;} .mobile-only{display:block;} @media(max-width: $tablet){ /* A good media width is perhaps the same breakpoint as sidebars */ .override-max{ position:relative; display:block; left: (-1/2) * $cpadding; /* match padding one side of .max */ width:calc(100% + $cpadding); /* 100% plus padding of both sides of .max */ } } /* ###################################### ###### Z-index of major elements ######################################### */ #top{z-index:10} #middle{z-index:3} #bottom{z-index:5} #sirconajax-background-image{z-index:1;} /* ################################### ###### TOP SEARCH ###################################### */ #top-search { position: absolute; bottom: 0px; right: 0px; padding: 0 $cpadding*0.5; text-align: right; @if($title-align == right) { right: auto; left: 0; text-align: left; } @media(max-width: $tablet) { position: relative; text-align: left; } } /* ###################################### ###### TOP ######################################### */ #top{ height: auto; margin-bottom: 0; position: relative; } .has-sidebar-showcase #top{margin-bottom:0;} /***** LOGO *****/ #main-logo{ position:absolute; bottom:18px; left:5px; .logo.mobile-only{ width:70px; height:70px; background:url(logo-mobile.png) 50% no-repeat; } .logo.desktop-only{ width:354px; height:70px; background:url(logo.png) 50% no-repeat; } } /************ Logo in top ********************/ .logo-container { text-align: center; @if(($title-align == left) or ($title-align == right)) { display: inline-block; vertical-align: middle; padding: 0px $cmargin 0 $cmargin; } } /******* BLOGINFO, title and description **********/ #bloginfo { text-align: $title-align; padding-top: $cpadding * 2; margin: auto; $icolor: $text-color-dark; @if(($menu-position == fixed)) { padding-top: $cpadding * 3; } h1 { margin-bottom: 10px; } p, h1, h1 a { @if(lightness($background) < 60) { color: setContrastColor($background, $icolor); } } &:after { @include clearBeforeAfter(); } @if(($title-align == left) or ($title-align == right)) { .blogtitle { display: inline-block; vertical-align: middle; } } } .blogtitle { } .bloginfo-setting-title { .blogdescription { display: none; } .blogtitle { margin-bottom: $cmargin * 0.5; } } .bloginfo-setting-none { #bloginfo { .blogdescription, .blogtitle { display: none; } } } .header-style-default.bloginfo-setting-none { #top { padding-top: $cpadding; background: transparent; } } /***** TOP HEADER *********/ .header-container { margin: auto; text-align: center; img { margin-bottom: $air; } } .no-header { height: $air; } .header-style-default { .header-container, #sidebar-showcase { max-width: $max - $cpadding; margin: auto; } #main-menu { max-width: $max - $cpadding; /* Only $max when header is also $max */ @if(($menu-position == fixed)) { max-width: 100%; } } #bloginfo { max-width: $max - $cpadding; /* Only $max when header is also $max */ } } .header-style-fullwidth.bloginfo-setting-none { #bloginfo { padding: 0; } } /***** header-1 sidebar "Header extras" *****/ #sirconajax-header-1{ position:absolute; top:0; right:0; .widget-title{ display:none; margin:0; } } /***** MENU *****/ .admin-bar #main-menu { @if($menu-position == fixed) { top: 32px; } } #main-menu{ position: $menu-position; top: 0; width: 100%; background: $theme-color; margin: auto; padding: 0; text-align: $menu-align; @if($background == $theme-color) { border-bottom: 1px solid $light-grey; border-top: 1px solid $light-grey; } /*
  • */ #main-menu-items > .menu-item { margin:0; } #main-menu-items { max-width: $max - $cpadding; margin: auto; /* */ .menu-clickable{ font-size: $fsize; transition:0.2s; padding:8px 20px; color: setContrastColor($theme-color, $link-color); } } /* Current
  • */ .current-menu-item{} /* Current */ .menu-clickable:hover, .current-menu-item > .menu-clickable{ background: $theme-color-dark; color: setContrastColor($theme-color-dark, $link-color); } /* Top level spesifics */ > .menu-item > .menu-clickable{} /* Current
  • */ > #main-menu-items > .current-menu-item{ /* Current */ > .menu-clickable{} } /* all submenu