github.com/shyftnetwork/go-empyrean@v1.8.3-0.20191127201940-fbfca9338f04/shyft_documentation/source/stylesheets/screen.css.scss (about)

     1  @charset "utf-8";
     2  @import 'normalize';
     3  @import 'variables';
     4  @import 'icon-font';
     5  // @import 'rtl'; // uncomment to switch to RTL format
     6  
     7  /*
     8  Copyright 2008-2013 Concur Technologies, Inc.
     9  
    10  Licensed under the Apache License, Version 2.0 (the "License"); you may
    11  not use this file except in compliance with the License. You may obtain
    12  a copy of the License at
    13  
    14    http://www.apache.org/licenses/LICENSE-2.0
    15  
    16  Unless required by applicable law or agreed to in writing, software
    17  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    18  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    19  License for the specific language governing permissions and limitations
    20  under the License.
    21  */
    22  
    23  ////////////////////////////////////////////////////////////////////////////////
    24  // GENERAL STUFF
    25  ////////////////////////////////////////////////////////////////////////////////
    26  
    27  html, body {
    28    color: $main-text;
    29    padding: 0;
    30    margin: 0;
    31    -webkit-font-smoothing: antialiased;
    32    -moz-osx-font-smoothing: grayscale;
    33    @extend %default-font;
    34    background-color: $main-bg;
    35    height: 100%;
    36    -webkit-text-size-adjust: none; /* Never autoresize text */
    37  }
    38  
    39  ////////////////////////////////////////////////////////////////////////////////
    40  // TABLE OF CONTENTS
    41  ////////////////////////////////////////////////////////////////////////////////
    42  
    43  #toc > ul > li > a > span {
    44    float: right;
    45    background-color: #2484FF;
    46    border-radius: 40px;
    47    width: 20px;
    48  }
    49  
    50  .toc-wrapper {
    51    transition: left 0.3s ease-in-out;
    52  
    53    overflow-y: auto;
    54    overflow-x: hidden;
    55    position: fixed;
    56    z-index: 30;
    57    top: 0;
    58    left: 0;
    59    bottom: 0;
    60    width: $nav-width;
    61    background-color: $nav-bg;
    62    font-size: 13px;
    63    font-weight: bold;
    64  
    65    // language selector for mobile devices
    66    .lang-selector {
    67      display: none;
    68      a {
    69        padding-top: 0.5em;
    70        padding-bottom: 0.5em;
    71      }
    72    }
    73  
    74    // This is the logo at the top of the ToC
    75    .logo {
    76      display: block;
    77      max-width: 100%;
    78      margin-bottom: $logo-margin;
    79    }
    80  
    81    &>.search {
    82      position: relative;
    83  
    84      input {
    85        background: $nav-bg;
    86        border-width: 0 0 1px 0;
    87        border-color: $search-box-border-color;
    88        padding: 6px 0 6px 20px;
    89        box-sizing: border-box;
    90        margin: $nav-v-padding $nav-padding;
    91        width: $nav-width - 30;
    92        outline: none;
    93        color: $nav-text;
    94        border-radius: 0; /* ios has a default border radius */
    95      }
    96  
    97      &:before {
    98        position: absolute;
    99        top: 17px;
   100        left: $nav-padding;
   101        color: $nav-text;
   102        @extend %icon-search;
   103      }
   104    }
   105  
   106    .search-results {
   107      margin-top: 0;
   108      box-sizing: border-box;
   109      height: 0;
   110      overflow-y: auto;
   111      overflow-x: hidden;
   112      transition-property: height, margin;
   113      transition-duration: 180ms;
   114      transition-timing-function: ease-in-out;
   115      background: $nav-subitem-bg;
   116      &.visible {
   117        height: 30%;
   118        margin-bottom: 1em;
   119      }
   120  
   121      li {
   122        margin: 1em $nav-padding;
   123        line-height: 1;
   124      }
   125  
   126      a {
   127        color: $nav-text;
   128        text-decoration: none;
   129  
   130        &:hover {
   131          text-decoration: underline;
   132        }
   133      }
   134    }
   135  
   136  
   137    // The Table of Contents is composed of multiple nested
   138    // unordered lists.  These styles remove the default
   139    // styling of an unordered list because it is ugly.
   140    ul, li {
   141      list-style: none;
   142      margin: 0;
   143      padding: 0;
   144      line-height: 28px;
   145    }
   146  
   147    li {
   148      color: $nav-text;
   149      transition-property: background;
   150      transition-timing-function: linear;
   151      transition-duration: 200ms;
   152    }
   153  
   154    // This is the currently selected ToC entry
   155    .toc-link.active {
   156      background-color: $nav-active-bg;
   157      color: $nav-active-text;
   158    }
   159  
   160    // this is parent links of the currently selected ToC entry
   161    .toc-link.active-parent {
   162      background-color: $nav-active-parent-bg;
   163      color: $nav-active-parent-text;
   164    }
   165  
   166    .toc-list-h2 {
   167      display: none;
   168      background-color: $nav-subitem-bg;
   169      font-weight: 500;
   170    }
   171  
   172    .toc-h2 {
   173      padding-left: $nav-padding + $nav-indent;
   174      font-size: 12px;
   175    }
   176  
   177    .toc-footer {
   178      padding: 1em 0;
   179      margin-top: 1em;
   180      border-top: 1px dashed $nav-footer-border-color;
   181  
   182      li,a {
   183        color: $nav-text;
   184        text-decoration: none;
   185      }
   186  
   187      a:hover {
   188        text-decoration: underline;
   189      }
   190  
   191      li {
   192        font-size: 0.8em;
   193        line-height: 1.7;
   194        text-decoration: none;
   195      }
   196    }
   197  }
   198  
   199  .toc-link, .toc-footer li {
   200    padding: 0 $nav-padding 0 $nav-padding;
   201    display: block;
   202    overflow-x: hidden;
   203    white-space: nowrap;
   204    text-overflow: ellipsis;
   205    text-decoration: none;
   206    color: $nav-text;
   207    transition-property: background;
   208    transition-timing-function: linear;
   209    transition-duration: 130ms;
   210  }
   211  
   212  // button to show navigation on mobile devices
   213  #nav-button {
   214    span {
   215      display: block;
   216      $side-pad: $main-padding / 2 - 8px;
   217      padding: $side-pad $side-pad $side-pad;
   218      background-color: rgba($main-bg, 0.7);
   219      transform-origin: 0 0;
   220      transform: rotate(-90deg) translate(-100%, 0);
   221      border-radius: 0 0 0 5px;
   222    }
   223    padding: 0 1.5em 5em 0; // increase touch size area
   224    display: none;
   225    position: fixed;
   226    top: 0;
   227    left: 0;
   228    z-index: 100;
   229    color: #000;
   230    text-decoration: none;
   231    font-weight: bold;
   232    opacity: 0.7;
   233    line-height: 16px;
   234    img {
   235      height: 16px;
   236      vertical-align: bottom;
   237    }
   238  
   239    transition: left 0.3s ease-in-out;
   240  
   241    &:hover { opacity: 1; }
   242    &.open {left: $nav-width}
   243  }
   244  
   245  
   246  ////////////////////////////////////////////////////////////////////////////////
   247  // PAGE LAYOUT AND CODE SAMPLE BACKGROUND
   248  ////////////////////////////////////////////////////////////////////////////////
   249  
   250  .page-wrapper {
   251    margin-left: $nav-width;
   252    position: relative;
   253    z-index: 10;
   254    background-color: $main-bg;
   255    min-height: 100%;
   256  
   257    padding-bottom: 1px; // prevent margin overflow
   258  
   259    // The dark box is what gives the code samples their dark background.
   260    // It sits essentially under the actual content block, which has a
   261    // transparent background.
   262    // I know, it's hackish, but it's the simplist way to make the left
   263    // half of the content always this background color.
   264    .dark-box {
   265      width: $examples-width;
   266      background-color: $examples-bg;
   267      position: absolute;
   268      right: 0;
   269      top: 0;
   270      bottom: 0;
   271    }
   272  
   273    .lang-selector {
   274      position: fixed;
   275      z-index: 50;
   276      border-bottom: 5px solid $lang-select-active-bg;
   277    }
   278  }
   279  
   280  .lang-selector {
   281    background-color: $lang-select-bg;
   282    width: 100%;
   283    font-weight: bold;
   284    a {
   285      display: block;
   286      float:left;
   287      color: $lang-select-text;
   288      text-decoration: none;
   289      padding: 0 10px;
   290      line-height: 30px;
   291      outline: 0;
   292  
   293      &:active, &:focus {
   294        background-color: $lang-select-pressed-bg;
   295        color: $lang-select-pressed-text;
   296      }
   297  
   298      &.active {
   299        background-color: $lang-select-active-bg;
   300        color: $lang-select-active-text;
   301      }
   302    }
   303  
   304    &:after {
   305      content: '';
   306      clear: both;
   307      display: block;
   308    }
   309  }
   310  
   311  ////////////////////////////////////////////////////////////////////////////////
   312  // CONTENT STYLES
   313  ////////////////////////////////////////////////////////////////////////////////
   314  // This is all the stuff with the light background in the left half of the page
   315  
   316  .content {
   317    // fixes webkit rendering bug for some: see #538
   318    -webkit-transform: translateZ(0);
   319    // to place content above the dark box
   320    position: relative;
   321    z-index: 30;
   322  
   323    &:after {
   324      content: '';
   325      display: block;
   326      clear: both;
   327    }
   328  
   329    &>h1, &>h2, &>h3, &>h4, &>h5, &>h6, &>p, &>table, &>ul, &>ol, &>aside, &>dl {
   330      margin-right: $examples-width;
   331      padding: 0 $main-padding;
   332      box-sizing: border-box;
   333      display: block;
   334  
   335      @extend %left-col;
   336    }
   337  
   338    &>ul, &>ol {
   339      padding-left: $main-padding + 15px;
   340    }
   341  
   342    // the div is the tocify hidden div for placeholding stuff
   343    &>h1, &>h2, &>div {
   344      clear:both;
   345    }
   346  
   347    h1 {
   348      @extend %header-font;
   349      font-size: 25px;
   350      padding-top: 0.5em;
   351      padding-bottom: 0.5em;
   352      margin-bottom: $h1-margin-bottom;
   353      margin-top: 2em;
   354      border-top: 1px solid #ccc;
   355      border-bottom: 1px solid #ccc;
   356      background-color: #fdfdfd;
   357    }
   358  
   359    h1:first-child, div:first-child + h1 {
   360      border-top-width: 0;
   361      margin-top: 0;
   362    }
   363  
   364    h2 {
   365      @extend %header-font;
   366      font-size: 19px;
   367      margin-top: 4em;
   368      margin-bottom: 0;
   369      border-top: 1px solid #ccc;
   370      padding-top: 1.2em;
   371      padding-bottom: 1.2em;
   372      background-image: linear-gradient(to bottom, rgba(#fff, 0.2), rgba(#fff, 0));
   373    }
   374  
   375    // h2s right after h1s should bump right up
   376    // against the h1s.
   377    h1 + h2, h1 + div + h2 {
   378      margin-top: $h1-margin-bottom * -1;
   379      border-top: none;
   380    }
   381  
   382    h3, h4, h5, h6 {
   383      @extend %header-font;
   384      font-size: 15px;
   385      margin-top: 2.5em;
   386      margin-bottom: 0.8em;
   387    }
   388  
   389    h4, h5, h6 {
   390      font-size: 10px;
   391    }
   392  
   393    hr {
   394      margin: 2em 0;
   395      border-top: 2px solid $examples-bg;
   396      border-bottom: 2px solid $main-bg;
   397    }
   398  
   399    table {
   400      margin-bottom: 1em;
   401      overflow: auto;
   402      th,td {
   403        text-align: left;
   404        vertical-align: top;
   405        line-height: 1.6;
   406        code {
   407          white-space: nowrap;
   408        }
   409      }
   410  
   411      th {
   412        padding: 5px 10px;
   413        border-bottom: 1px solid #ccc;
   414        vertical-align: bottom;
   415      }
   416  
   417      td {
   418        padding: 10px;
   419      }
   420  
   421      tr:last-child {
   422        border-bottom: 1px solid #ccc;
   423      }
   424  
   425      tr:nth-child(odd)>td {
   426        background-color: lighten($main-bg,4.2%);
   427      }
   428  
   429      tr:nth-child(even)>td {
   430        background-color: lighten($main-bg,2.4%);
   431      }
   432    }
   433  
   434    dt {
   435      font-weight: bold;
   436    }
   437  
   438    dd {
   439      margin-left: 15px;
   440    }
   441  
   442    p, li, dt, dd {
   443      line-height: 1.6;
   444      margin-top: 0;
   445    }
   446  
   447    img {
   448      max-width: 100%;
   449    }
   450  
   451    code {
   452      background-color: rgba(0,0,0,0.05);
   453      padding: 3px;
   454      border-radius: 3px;
   455      @extend %break-words;
   456      @extend %code-font;
   457    }
   458  
   459    pre>code {
   460      background-color: transparent;
   461      padding: 0;
   462    }
   463  
   464    aside {
   465      padding-top: 1em;
   466      padding-bottom: 1em;
   467      margin-top: 1.5em;
   468      margin-bottom: 1.5em;
   469      background: $aside-notice-bg;
   470      line-height: 1.6;
   471  
   472      &.warning {
   473        background-color: $aside-warning-bg;
   474      }
   475  
   476      &.success {
   477        background-color: $aside-success-bg;
   478      }
   479    }
   480  
   481    aside:before {
   482      vertical-align: middle;
   483      padding-right: 0.5em;
   484      font-size: 14px;
   485    }
   486  
   487    aside.notice:before {
   488      @extend %icon-info-sign;
   489    }
   490  
   491    aside.warning:before {
   492      @extend %icon-exclamation-sign;
   493    }
   494  
   495    aside.success:before {
   496      @extend %icon-ok-sign;
   497    }
   498  
   499    .search-highlight {
   500      padding: 2px;
   501      margin: -3px;
   502      border-radius: 4px;
   503      border: 1px solid #F7E633;
   504      background: linear-gradient(to top left, #F7E633 0%, #F1D32F 100%);
   505    }
   506  }
   507  
   508  ////////////////////////////////////////////////////////////////////////////////
   509  // CODE SAMPLE STYLES
   510  ////////////////////////////////////////////////////////////////////////////////
   511  // This is all the stuff that appears in the right half of the page
   512  
   513  .content {
   514    pre, blockquote {
   515      background-color: $code-bg;
   516      color: #fff;
   517  
   518      margin: 0;
   519      width: $examples-width;
   520  
   521      float:right;
   522      clear:right;
   523  
   524      box-sizing: border-box;
   525  
   526      @extend %right-col;
   527  
   528      &>p { margin: 0; }
   529  
   530      a {
   531        color: #fff;
   532        text-decoration: none;
   533        border-bottom: dashed 1px #ccc;
   534      }
   535    }
   536  
   537    pre {
   538      @extend %code-font;
   539      padding-top: 2em;
   540      padding-bottom: 2em;
   541      padding: 2em $main-padding;
   542    }
   543  
   544    blockquote {
   545      &>p {
   546        background-color: $code-annotation-bg;
   547        padding: $code-annotation-padding 2em;
   548        color: #eee;
   549      }
   550    }
   551  }
   552  
   553  ////////////////////////////////////////////////////////////////////////////////
   554  // RESPONSIVE DESIGN
   555  ////////////////////////////////////////////////////////////////////////////////
   556  // These are the styles for phones and tablets
   557  // There are also a couple styles disperesed
   558  
   559  @media (max-width: $tablet-width) {
   560    .toc-wrapper {
   561      left: -$nav-width;
   562  
   563      &.open {
   564        left: 0;
   565      }
   566    }
   567  
   568    .page-wrapper {
   569      margin-left: 0;
   570    }
   571  
   572    #nav-button {
   573      display: block;
   574    }
   575  
   576    .toc-link {
   577      padding-top: 0.3em;
   578      padding-bottom: 0.3em;
   579    }
   580  }
   581  
   582  @media (max-width: $phone-width) {
   583    .dark-box {
   584      display: none;
   585    }
   586  
   587    %left-col {
   588      margin-right: 0;
   589    }
   590  
   591    .toc-wrapper .lang-selector {
   592      display: block;
   593    }
   594  
   595    .page-wrapper .lang-selector {
   596      display: none;
   597    }
   598  
   599    %right-col {
   600      width: auto;
   601      float: none;
   602    }
   603  
   604    %right-col + %left-col {
   605      margin-top: $main-padding;
   606    }
   607  }
   608  
   609  .highlight .c, .highlight .cm, .highlight .c1, .highlight .cs {
   610    color: #909090;
   611  }
   612  
   613  .highlight, .highlight .w {
   614    background-color: $code-bg;
   615  }