openmct/platform/commonUI/general/res/sass/_mixins.scss
Victor Woeltjen d1e1ba1c66 [Frontend] Refactor glyphs to classes
Squashes #1103, fixes #1047.

Squashed commit of the following:

commit 0e060f174d
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Fri Jul 29 14:55:34 2016 -0700

    [Frontend] Added button to .s-button

    Fixes #1047

commit 9f74395a79
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Fri Jul 29 14:43:36 2016 -0700

    [Frontend] Fixing problems from circleci

    Fixes #1047

commit 7278c9534c
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Fri Jul 29 14:37:21 2016 -0700

    [Frontend] CSS fixes for s-status classes

    Fixes #1047
    Fixed .s-status-editing and s-status-pending;

commit 4606d617d1
Merge: d5bff55 59436f7
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Fri Jul 29 13:58:51 2016 -0700

    Merge remote-tracking branch 'origin/master' into frontend-1047

commit d5bff555e0
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 19:09:33 2016 -0700

    [Frontend] Updated glyphs used by plot view switcher

    Fixes #1047

commit b72d82baef
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 19:09:00 2016 -0700

    [Frontend] Tree styles in left pane and selector-list

    Fixes #1047

commit af36b9996d
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 18:32:34 2016 -0700

    [Frontend] Form validation styling

    Fixes #1047
    <mct-form> must now include class
    'validates'  to display validation glyph icons;
    removed 'no-validate' from markup; cleaned
    up validation scss;

commit 69dc893b4b
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 17:11:52 2016 -0700

    [Frontend] Glyphs to classes, mobile

    Fixes #1047
    Fixes and enhancements for mobile,
    particularly in tree;  Removed
    `display: inline-block` from containerSubtle
    mixin;

commit 7bca18b186
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 11:36:19 2016 -0700

    [Frontend] Rename .s-menu-btn, remove unused

    Fixes #1047
    .s-menu-btn > .s-menu-button;
    .create-btn > .create-button;
    removed unused l-btn, t-btn,
    t-btns-zoom from markup

commit 5d229198b7
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 11:25:36 2016 -0700

    [Frontend] Rename .s-clickable-icon to .s-icon-button

    Fixes #1047

commit 36479e2e8b
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 11:20:30 2016 -0700

    [Frontend] Rename .s-btn to .s-button

    Fixes #1047

commit 89e4f06de9
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 11:12:07 2016 -0700

    [Frontend] Apply clickable-icon class

    Fixes #1047

commit e65ca1cb8b
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Thu Jul 28 10:52:35 2016 -0700

    [Frontend] Updated icons

    Fixes #1047
    - Clock, timer, plots updated

commit 3e7eb98ac2
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Wed Jul 27 18:05:06 2016 -0700

    [Frontend] Standardizing styles

    Fixes #1047
    - Finessing mini-tab and making able to
    control per theme; s-clickable and s-toggle-icon
    classes cleaned up

commit 18e08074a8
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Wed Jul 27 16:33:25 2016 -0700

    [Frontend] Tweaks to sass code

    Fixes #1047
    - Splitter and mini-tab-icon elements

commit 44fda8d68f
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Wed Jul 27 09:24:53 2016 -0700

    [Frontend] Multiple UI fixes and tweaks

    Fixes #1047
    mini-tabs, splitters and bg-splash updated;
    moved position of Inspector collapse mini-tab
    to allow position transition;
    splitter-sm class added for Timelines;

commit 2aee8bc0d8
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jul 26 15:53:32 2016 -0700

    [Frontend] Updated splash image

    Fixes #1047

commit 624f09777f
Merge: ce7591f 4d2f159
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jul 26 15:02:55 2016 -0700

    Merge remote-tracking branch 'origin/master' into frontend-1047

commit ce7591f642
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jul 26 11:22:23 2016 -0700

    [Frontend] Fixed clock indicator

    Fixes #1047
    Restored no-collapse and float-right
    properties;

commit 5324c8edba
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 25 18:14:38 2016 -0700

    [Frontend] New font and project file

    Fixes #1047
    New font files that were missed in
    last commit; updated icomoon proj
    file; fixed missing char codes in
    glyphs.scss;

commit a3b2628883
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 25 17:54:00 2016 -0700

    [Frontend] Revised and new icon art

    Fixes #1047
    New icons for overlay and stacked plots;
    revised art and new description for
    Fixed Position object;

commit 8a41c6dbc7
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 25 17:52:41 2016 -0700

    [Frontend] Removing glyph definitions

    Fixes #1047
    Updated comment

commit eb293b21eb
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 25 11:56:18 2016 -0700

    [Frontend] Removing glyph definitions

    Fixes #1047
    Removed commented code

commit d8b1fb7781
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 25 11:17:45 2016 -0700

    [Frontend] Removing glyph definitions; updating tests

    Fixes #1047
    Search and removal of "glyph" definitions in bundle
    and other JS files; updating tests accordingly;

commit 650fbcc921
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 25 10:20:33 2016 -0700

    [Frontend] Removing glyph definitions; updating tests

    Fixes #1047
    Search and removal of "glyph" definitions in bundle
    and other JS files; updating tests accordingly;

commit 574b8bd5c1
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Fri Jul 22 19:11:56 2016 -0700

    [Frontend] Updated tests for glyph refactoring

    Fixes #1047
    Fixing test cases

commit dd84177441
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Fri Jul 22 18:47:45 2016 -0700

    [Frontend] Updated tests and examples for glyph refactoring

    Fixes #1047
    WIP: Fixing test cases: fixed test in Timers that was expecting
    glyph return;

commit 2231f8e124
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 17:45:20 2016 -0700

    [Frontend] Updated tests for glyph refactoring

    Fixes #1047
    Fixing test cases: fixed test in Timers that was expecting
    glyph return;

commit ae59ecfa97
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 17:38:45 2016 -0700

    [Frontend] Fixed style

    Fixes #1047
    WIP: fixed line-height issue for t-item-icon class

commit d43bff1445
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 17:07:49 2016 -0700

    [Frontend] Fixed colors

    Fixes #1047
    WIP: fixed colors  and style defs related to clickable
    icons

commit c2db6f8805
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 16:32:17 2016 -0700

    [Frontend] Fixed colors

    Fixes #1047
    WIP: fixed colors related to changes to
    btnSubtle mixin; new constants for clickable
    icons

commit a4753c44d1
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 15:23:58 2016 -0700

    [Frontend] Added new icon-brackets to symbols font

    Fixes #1047
    WIP

commit 2704640b94
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 15:11:28 2016 -0700

    [Frontend] Normalize color constants

    Fixes #1047
    Normalize color constant values for themes; consolidated
    and cleaned up btn-related mixins; fixed hover color issues

commit 421286c7e4
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 14:10:13 2016 -0700

    [Frontend] Convert new Fixed Position Display from glyphs

    Fixes #1047
    WIP

commit a4111f3855
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 14:07:38 2016 -0700

    [Frontend] Refactoring Timeline glyphs, s-btn fixes

    Fixes #1047
    WIP: Timeline-related glyph refactoring; s-btn
    styles and hover color fixes

commit 883f999215
Merge: 9d9cabb 14f1a1f
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jul 21 08:53:23 2016 -0700

    Merge remote-tracking branch 'origin/master' into frontend-1047

commit 9d9cabb760
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jul 19 16:20:20 2016 -0700

    [Frontend] Glyph refactoring

    Fixes #1047
    WIP: search, toolbar buttons; mods
    to flex archetypes

commit 28b663ce41
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 18 14:58:40 2016 -0700

    [Frontend] Glyph-related style changes to toolbars and buttons

    Fixes #1047
    Glyph refactoring  WIP for toolbar buttons;
    Timeline glyph refactoring continued

commit a9326f572f
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 18 13:36:45 2016 -0700

    [Frontend] Glyph-related style changes to Timelines

    Fixes #1047
    Timeline glyph refactoring; Resource Graph icons
    in swimlanes now display grayed-out version when not
    added to the Resource Graph; minor color tweaks

commit d6e1737803
Merge: 88054e5 6176ca2
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Mon Jul 18 10:29:32 2016 -0700

    [Frontend] Merge master into frontend-1047

    Fixes #1047
    Resolved conflict in icomoon.json file

commit 88054e5e8e
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 30 16:55:40 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In progress: significant mods to pane collapse/expand
    buttons and symbols, minor tweaks to splitter look,
    limits glyph definitions

commit 7c47343f5c
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 30 16:52:21 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In progress: updated font files glyphs, mostly
    for pane collapse icons

commit fd00bdce54
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 30 12:20:55 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In progress: search menu

commit 272b4b649e
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 30 12:11:25 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In progress: moved limits classes out
    of _contants and into _glyphs;
    timers, entanglement context menu items,
    form validation, date picker.

commit 95d26e6fe7
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Wed Jun 29 14:18:12 2016 -0700

    [Frontend] Refactoring glyphs to classes

    Fixes #1047
    In-progress; limits

commit 26b30d96db
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 28 17:16:18 2016 -0700

    [Frontend] Refactoring glyphs to classes

    Fixes #1047
    In-progress; overlay close, search inputs,
    messages and message banners,
    ui-symbol removal in-progress.

commit 4e2a01ad85
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 28 16:21:05 2016 -0700

    [Frontend] Refactoring glyphs to classes

    Fixes #1047
    In-progress; .labeled added  to .s-btn,
    removed .s-icon-btn

commit 521db3c3fe
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 28 16:10:54 2016 -0700

    [Frontend] Refactoring glyphs to classes

    Fixes #1047
    In-progress; plot options, imagery buttons,
    cleanups in buttons.scss, edit-action buttons,
    .s-btn .no-label class added.

commit 8bb8db69e6
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 28 14:47:52 2016 -0700

    [Frontend] Refactoring glyphs to classes

    Fixes #1047
    In-progress; indicators, notifications, actions,
    tests

commit 53ed0bfb22
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 17:01:45 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In progress, really: view icons, timer/clock

commit 47dc7f2f6b
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 16:13:31 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In progress: grid items

commit 2bd34f71be
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 15:00:46 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    Context menus and associated actions,
    custom checkboxes, tree item being edited

commit b561d4f60e
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 14:27:56 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In-progess: glyphs.scss now uses $vars to
    allow other scss to use a var instead of string
    literals;

commit 0cf4089620
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 14:13:59 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In-progess: tree-labels, unknown objects, object
    header

commit 46cae10905
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 11:41:06 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In-progess, menus and Create menu fixes

commit fe3097707f
Merge: 7d69ae4 652a50c
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Mon Jun 27 11:20:55 2016 -0700

    Merge remote-tracking branch 'origin/master' into frontend-1047

commit 7d69ae401b
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 23 15:59:56 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In-progress, converting types, mods to
    Create Menu template

commit 18d9f3d6b2
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 23 15:14:22 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    Very much In-progess: convert some controls;

commit e93a90a782
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 23 11:28:07 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    Very much In-progess, classes for all symbols
    added to glyphs.scss; .menu cleaned up;

commit dc670b22a6
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Thu Jun 23 08:55:27 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    Very much In-progess, "icon-" selector,
    browse bar buttons

commit 8b29ccf3af
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Wed Jun 22 23:15:24 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    Very much In-progess, s-btn and
    s-btn-menu refactoring

commit f574ffed16
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Wed Jun 22 14:37:34 2016 -0700

    [Frontend] Refactoring glyphs to classes

    fixes #1047
    In-progess, e900 > e904

commit bc62ee4565
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Wed Jun 22 13:28:15 2016 -0700

    [Frontend] Complete revamp of unicodes

    fixes #1047
    New font files; no re-mapping yet in the app.

commit 614f0c6e9f
Author: Charles Hacskaylo <charles.f.hacskaylo@nasa.gov>
Date:   Wed Jun 22 13:23:18 2016 -0700

    [Frontend] Complete revamp of unicodes

    fixes #1047
    Moved all glyphs into PUA area of font, and
    re-organized by category.

commit 47bd4031d5
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 21 18:39:48 2016 -0700

    [Frontend] Renaming symbols font files

    Fixes #1047
    - Modified sass to point to renamed font files;
    - Added new 12px symbols font files to sass;

commit 22a51d6bbb
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 21 18:22:33 2016 -0700

    [Frontend] Updating Icomoon project files

    Fixes #1047
    - Renamed main project file;
    - Added new 12px symbols project file;

commit 13ded2fd84
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 21 18:19:27 2016 -0700

    [Frontend] Added new 12px symbols font files

    Fixes #1047

commit aef5660dfd
Author: Charles Hacskaylo <charlesh88@gmail.com>
Date:   Tue Jun 21 18:16:56 2016 -0700

    [Frontend] Renaming symbols font files

    Fixes #1047
2016-08-01 14:33:25 -07:00

452 lines
12 KiB
SCSS

/*****************************************************************************
* Open MCT, Copyright (c) 2014-2016, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
@mixin absPosDefault($offset: 0px, $overflowHidden: hidden) {
overflow: $overflowHidden;
position: absolute;
top: $offset;
right: $offset;
bottom: $offset;
left: $offset;
width: auto;
height: auto;
}
@mixin ancillaryIcon($d, $c) {
// Used for small icons used in combination with larger icons,
// like the link and alert icons in tree items.
color: $c;
font-size: $d;
line-height: $d;
height: $d;
width: $d;
}
@mixin trans-prop-nice($props, $dur: 500ms, $delay: 0) {
// Multiple $props must be in parans like this: (left, right)
@if $dur == 0 {
@include transition-property(none);
} @else {
@include transition-property($props);
@include transition-duration($dur);
@include transition-timing-function(ease-in-out);
@include transition-delay($delay);
}
}
@mixin trans-prop-nice-fade($dur: 500ms, $delay: 0) {
@if $dur == 0 {
@include transition-property(none);
} @else {
@include transition-property(opacity, background-color, border-color, color);
@include transition-duration($dur);
@include transition-timing-function(ease-in-out);
@include transition-delay($delay);
}
}
@mixin trans-prop-nice-resize($t: 0.5s, $tf: ease-in-out) {
@include transition-property(height, width, top, right, bottom, left, opacity);
@include transition-duration($t);
@include transition-timing-function($tf);
}
@mixin trans-prop-nice-resize-h($dur: 500ms, $delay: 0) {
@include transition-property(height, bottom, top);
@include transition-duration($dur);
@include transition-timing-function(ease-in-out);
@include transition-delay($delay);
}
@mixin trans-prop-nice-resize-w($dur: 500ms, $delay: 0) {
@include transition-property(width, left, right);
@include transition-duration($dur);
@include transition-timing-function(ease-in-out);
@include transition-delay($delay);
}
@mixin triangle-right($size, $color) {
$size: $size/2;
$ratio: 1;
width: 0;
height: 0;
border-top: $size/$ratio solid transparent;
border-left: $size solid $color;
border-bottom: $size/$ratio solid transparent;
}
@mixin triangle-down($size, $color) {
$size: $size/2;
$ratio: 1;
width: 0;
height: 0;
border-left: $size/$ratio solid transparent;
border-top: $size solid $color;
border-right: $size/$ratio solid transparent;
}
@mixin triangle($dir: "left", $size: 5px, $ratio: 1, $color: red) {
width: 0;
height: 0;
$slopedB: $size/$ratio solid transparent;
$straightB: $size solid $color;
@if $dir == "up" {
border-left: $slopedB;
border-right: $slopedB;
border-bottom: $straightB;
} @else if $dir == "right" {
border-top: $slopedB;
border-bottom: $slopedB;
border-left: $straightB;
} @else if $dir == "down" {
border-left: $slopedB;
border-right: $slopedB;
border-top: $straightB;
} @else {
border-top: $slopedB;
border-bottom: $slopedB;
border-right: $straightB;
}
}
@mixin bgDiagonalStripes($c: yellow, $a: 0.1, $d: 40px) {
@include background-image(linear-gradient(-45deg,
rgba($c, $a) 25%, transparent 25%,
transparent 50%, rgba($c, $a) 50%,
rgba($c, $a) 75%, transparent 75%,
transparent 100%
));
background-repeat: repeat;
background-size: $d $d;
}
@mixin bgStripes($c: yellow, $a: 0.1, $bgsize: 5px, $angle: 90deg) {
@include background-image(linear-gradient($angle,
rgba($c, $a) 25%, transparent 25%,
transparent 50%, rgba($c, $a) 50%,
rgba($c, $a) 75%, transparent 75%,
transparent 100%
));
background-repeat: repeat;
background-size: $bgsize $bgsize;
}
@mixin bgVertStripes($c: yellow, $a: 0.1, $d: 40px) {
@include background-image(linear-gradient(-90deg,
rgba($c, $a) 0%, rgba($c, $a) 50%,
transparent 50%, transparent 100%
));
background-repeat: repeat;
background-size: $d $d;
}
@mixin bgVertFuzzyStripes($c: yellow, $a: 0.1, $d: 40px) {
@include background-image(linear-gradient(-90deg,
rgba($c, $a) 0%, transparent 50%,
transparent 50%, rgba($c, $a) 100%
));
background-repeat: repeat;
background-size: $d $d;
}
@mixin bgTicks($c: $colorBodyFg, $repeatDir: 'x') {
$deg: 90deg;
@if ($repeatDir != 'x') {
$deg: 0deg;
$repeatDir: repeat-y;
} @else {
$repeatDir: repeat-x;
}
@include background-image(linear-gradient($deg,
$c 1px, transparent 1px,
transparent 100%
));
background-repeat: $repeatDir;
}
@mixin sliderTrack($bg: $scrollbarTrackColorBg) {
//$b: 1px solid lighten($bg, 30%);
border-radius: 2px;
box-sizing: border-box;
@include boxIncised(0.7);
background-color: $bg;
//border-bottom: $b;
//border-right: $b;
}
@mixin controlGrippy($b, $direction: horizontal, $w: 1px, $style: dotted) {
//&:before {
//@include trans-prop-nice("border-color", 25ms);
content: '';
display: block;
//height: auto;
pointer-events: none;
position: absolute;
z-index: 2;
@if $direction == "horizontal" {
border-top: $w $style darken($b, 15%);
top: 2px;
left: 5px;
right: 5px;
height: 1px;
} @else if $direction == "vertical" {
border-left: $w $style darken($b, 15%);
left: 2px;
bottom: 5px;
top: 5px;
width: 1px;
}
}
@mixin boxIncised($sVal: 0.6, $inset: 5px) {
box-shadow: inset rgba(black, $sVal) 0 1px $inset;
}
@mixin boxOutline($c: lighten($colorBodyBg, 20%)) {
border: 1px solid $c;
}
@mixin boxShdw($sVal: rgba(black, 0.4) 0 0 3px) {
@if $sVal != 'none' {
box-shadow: $sVal;
}
}
@mixin boxShdwSubtle($sVal: 0.2) {
@if $sVal != 'none' {
box-shadow: rgba(black, $sVal) 0 1px 2px;
}
}
@mixin boxShdwLarge($sVal: 0.7) {
@if $sVal != 'none' {
box-shadow: rgba(black, $sVal) 0 3px 10px;
}
}
@mixin outerGlow($color: #fff, $sVal: 0.3) {
box-shadow: rgba($color, $sVal) 0 0 30px;
}
@mixin linearGlow($deg: 0, $c: red, $a: 0.4) {
@include background-image(linear-gradient($deg, rgba($c, 0), rgba($c, $a) 100%));
}
@mixin subtleGrad($deg: 0, $c: red, $a0: 0.2, $a1: 0.3) {
@include background-image(linear-gradient($deg, rgba($c, $a0), rgba($c, $a1) 100%));
}
@mixin txtShdw($sVal) {
//@if $sVal != 'none' {
text-shadow: $sVal;
//}
}
@mixin txtShdwSubtle($sVal: 0.1) {
@if $sVal != 'none' {
text-shadow: rgba(black, $sVal) 0 1px 2px;
}
}
@mixin txtShdwLarge($sVal: 0.7) {
text-shadow: rgba(black, $sVal) 0 3px 7px;
}
@function pullForward($c, $p: 20%) {
// For dark interfaces, lighter things come forward
@return lighten($c, $p);
}
@function pushBack($c, $p: 20%) {
// For dark interfaces, darker things move back
@return darken($c, $p);
}
@function percentToDecimal($p) {
@return $p / 100%;
}
@function decimalToPercent($d) {
@return percentage($d);
}
@function splitterHandleInset($splitterD: 21px, $splitterHandleD: 1px) {
// Space to either side of the handle
@return ($splitterD - $splitterHandleD) / 2;
}
/*********************************************** CONTROLS, FORM ELEMENTS */
@mixin containerBase($bg: $colorBodyBg, $fg: $colorBodyFg) {
background-color: $bg;
border-radius: $controlCr;
box-sizing: border-box;
color: $fg;
//display: inline-block;
}
@mixin btnBase($bg: $colorBtnBg, $bgHov: $colorBtnBgHov, $fg: $colorBtnFg, $fgHov: $colorBtnFgHov, $ic: $colorBtnIcon, $icHov: $colorBtnIconHov) {
@include user-select(none);
color: $fg;
.icon,
&:before {
color: $ic;
}
@if $bgHov != none {
&:not(.disabled):hover {
background: $bgHov;
color: $fgHov;
>.icon,
&:before {
color: $icHov;
}
}
}
}
@mixin btnSubtle($bg: $colorBtnBg, $bgHov: $colorBtnBgHov, $fg: $colorBtnFg, $fgHov: $colorBtnFgHov, $ic: $colorBtnIcon, $icHov: $colorBtnIconHov) {
@include containerSubtle($bg, $fg);
@include btnBase($bgHov: $bgHov, $fg: $fg, $fgHov: $fgHov, $ic: $ic, $icHov: $icHov);
text-shadow: $shdwItemText;
}
@mixin input-base($bg: $colorInputBg, $fg: $colorInputFg, $shdw: rgba(black, 0.6) 0 1px 3px) {
@include appearance(none);
border-radius: $controlCr;
box-sizing: border-box;
box-shadow: inset $shdw;
background: $bg;
border: none;
color: $fg;
outline: none;
&.error {
background-color: $colorFormFieldErrorBg;
color: $colorFormFieldErrorFg;
}
}
@mixin nice-input($bg: $colorInputBg, $fg: $colorInputFg) {
@include input-base($bg, $fg);
}
@mixin contextArrow() {
text-shadow: none;
content: $glyph-icon-arrow-down;
display: inline-block;
font-family: 'symbolsfont';
margin-left: $interiorMarginSm;
}
@mixin nice-textarea($bg: $colorBodyBg, $fg: $colorBodyFg) {
@include input-base($bg, $fg);
padding: $interiorMargin;
}
@mixin subdued-input($bg: $colorBodyBg, $fg: $colorBodyFg) {
@include nice-input($bg, $fg);
background: lighten($bg, 3%);
border-bottom: 1px solid lighten($bg, 10%);
}
@mixin menuUlReset() {
margin: 0;
padding: 0;
li {
list-style-type: none;
margin: 0;
padding: 0;
}
}
@mixin webkitProp($name, $val) {
#{$name}: #{$val};
-webkit-#{$name}: #{$val};
}
@mixin webkitVal($name, $val) {
#{$name}: #{$val};
#{$name}: -webkit-#{$val};
}
@mixin verticalCenter {
/* This doesn't work on an element inside an element with absolute positioning that has height: auto */
//position: relative;
top: 50%;
@include transform(translateY(-50%));
}
@mixin verticalCenterBlock($holderH, $itemH) {
top: floor(($holderH - $itemH) / 2);
bottom: auto;
height: $itemH;
}
@mixin ellipsize() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@mixin scrollH($showBar: auto) {
overflow-x: $showBar;
overflow-y: hidden;
}
@mixin scrollV($showBar: auto) {
overflow-x: hidden;
overflow-y: $showBar;
}
@mixin test($c: #ffcc00, $a: 0.2) {
background-color: rgba($c, $a) !important;
}
@mixin tmpBorder($c: #ffcc00, $a: 0.75) {
box-sizing: border-box;
border: 1px dotted rgba($c, $a);
}
@mixin testObj($w: 2000px, $h: 1000px, $c: black, $a: 0.1) {
&:after {
box-sizing: border-box;
@include bgDiagonalStripes($c, $a);
color: rgba(white, 0.3);
font-style: italic;
content: "Test Object";
display: block;
padding: 20px;
position: relative;
width: $w;
height: $h;
transform: scaleX(1) scaleY(1) scaleZ(1);
transform-origin: 50% 50% 0;
}
}
@mixin s-stale($a: 0.5) {
color: rgba($colorTelemFresh, $a) !important;
font-style: italic;
}