/***************************************************************************** * Open MCT, Copyright (c) 2014-2020, 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. *****************************************************************************/ /******************************************************** BUTTONS */ // Optionally can include icon in :before via markup button { @include htmlInputReset(); } .c-button, .c-button--menu { @include cButton(); } .c-button { &--menu { &:after { content: $glyph-icon-arrow-down; font-family: symbolsfont; opacity: 0.5; } } &--swatched { // Used with c-button--menu: a visual button with a larger swatch element adjacent to an icon .c-swatch { $d: 12px; margin-left: $interiorMarginSm; height: $d; width: $d; } } &[class*='__collapse-button'] { box-shadow: none; background: $splitterBtnColorBg; color: $splitterBtnColorFg; border-radius: $smallCr; line-height: 90%; padding: 3px 10px; @include desktop() { font-size: 6px; } &:before { content: $glyph-icon-arrow-down; font-size: 1.1em; } } &.is-active { background: $colorBtnActiveBg; color: $colorBtnActiveFg; } &.is-selected { background: $colorBtnSelectedBg; color: $colorBtnSelectedFg; } } /********* Icon Buttons and Links */ .c-click-icon { @include cClickIcon(); &--section-collapse { color: inherit; display: block; transition: transform $transOutTime; &:before { content: $glyph-icon-arrow-down; font-family: symbolsfont; } &.is-collapsed { transform: rotate(180deg); } } } .c-click-link, .c-icon-link { // A clickable element, typically inline, with an icon and label @include cControl(); cursor: pointer; } .c-icon-button, .c-click-swatch { @include cClickIconButton(); &--menu { @include hasMenu(); } } .c-icon-link { &:before { // Icon //color: $colorBtnMajorBg; } } .c-icon-button { &__label { margin-left: $interiorMargin; } &--mixed { @include mixedBg(); } &--swatched { // Color control, show swatch element display: flex; flex-flow: column nowrap; align-items: center; justify-content: center; > [class*='swatch'] { box-shadow: inset rgba($editUIBaseColorFg, 0.2) 0 0 0 1px; flex: 0 0 auto; height: 5px; width: 100%; margin-top: 1px; } &:before { // Reduce size of icon to make a bit of room flex: 1 1 auto; font-size: 1.1em; } } } .c-list-button { @include cControl(); color: $colorBodyFg; cursor: pointer; justify-content: start; padding: $interiorMargin; > * + * { margin-left: $interiorMargin; } @include hover() { background: $colorItemTreeHoverBg; } .c-button { flex: 0 0 auto; } } /******************************************************** DISCLOSURE CONTROLS */ /********* Disclosure Button */ // Provides a downward arrow icon that when clicked displays additional options and/or info. // Always placed AFTER an element .c-disclosure-button { @include cClickIcon(); margin-left: $interiorMarginSm; &:before { content: $glyph-icon-arrow-down; font-family: symbolsfont; font-size: 0.7em; } } /********* Disclosure Triangle */ // Provides an arrow icon that when clicked expands an element to reveal its contents. // Used in tree items, plot legends. Always placed BEFORE an element. .c-disclosure-triangle { $d: 12px; color: $colorDisclosureCtrl; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: $d; position: relative; &.is-enabled { cursor: pointer; &:hover { color: $colorDisclosureCtrlHov; } &:before { $s: .65; content: $glyph-icon-arrow-right-equilateral; display: block; font-family: symbolsfont; font-size: 1rem * $s; } } &--expanded { &:before { transform: rotate(90deg); } } } /******************************************************** DRAG AFFORDANCES */ .c-grippy { $d: 10px; @include grippy($c: $colorItemTreeVC, $dir: 'y'); width: $d; height: $d; &--vertical-drag { cursor: ns-resize; } } /******************************************************** SECTION */ section { flex: 0 1 auto; overflow: hidden; + section { margin-top: $interiorMargin; } .c-section__header { @include propertiesHeader(); display: flex; flex: 0 0 auto; align-items: center; margin-bottom: $interiorMargin; > * + * { margin-left: $interiorMarginSm; } } > [class*='__label'] { flex: 1 1 auto; text-transform: uppercase; } } /******************************************************** FORM ELEMENTS */ input, textarea { font-family: inherit; font-weight: inherit; letter-spacing: inherit; } input[type=text], input[type=search], input[type=number], textarea { @include reactive-input(); padding: $inputTextP; &.numeric { text-align: right; } } input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { margin-right: -5px !important; margin-top: -1px !important; } .c-input { &--flex { width: 100%; min-width: 20px; } &--datetime { // Sized for values such as 2018-09-28 22:32:33.468Z width: 160px; } &--hrs-min-sec { // Sized for values such as 00:25:00 width: 60px; } &-inline, &--inline { // A text input or contenteditable element that indicates edit affordance on hover and looks like an input on focus @include inlineInput; &:hover, &:focus { background: $colorInputBg; padding-left: $inputTextPLeftRight; padding-right: $inputTextPLeftRight; } } &--labeled { // TODO: replace .c-labeled-input with this // An input used in the Toolbar // Assumes label is before the input @include cControl(); input { margin-left: $interiorMarginSm; } } &--sm { // Small inputs, like small numerics width: 40px; } } input[type=number].c-input-number--no-spinners { &::-webkit-inner-spin-button, &::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } -moz-appearance: textfield; } .c-labeled-input { // An input used in the Toolbar // Assumes label is before the input @include cControl(); input { margin-left: $interiorMarginSm; } } // SELECTS select { @include appearanceNone(); background-color: $colorSelectBg; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3e%3cpath fill='%23#{svgColorFromHex($colorSelectArw)}' d='M5 5l5-5H0z'/%3e%3c/svg%3e"); color: $colorSelectFg; box-shadow: $shdwSelect; background-repeat: no-repeat, no-repeat; background-position: right .4em top 80%, 0 0; border: none; border-radius: $controlCr; padding: 2px 20px 2px $interiorMargin; *, option { background: $colorBtnBg; color: $colorBtnFg; } } // CHECKBOX LISTS // __input followed by __label .c-checkbox-list { // Rows &__row + &__row { margin-top: $interiorMarginSm; } // input and label in each __row &__row { > * + * { margin-left: $interiorMargin; } } } /******************************************************** TABS */ .c-tabs { // Single horizontal strip of tabs, with a bottom divider line @include userSelectNone(); display: flex; flex: 0 0 auto; flex-wrap: wrap; position: relative; // Required in case this is applied to a