mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48:12 +00:00
Markup / scss refactor WIP
- Add input-related styling; - Cleanup scss in various files; - Move search into own component; - Refine padding approach in pane-tree;
This commit is contained in:
@ -234,7 +234,7 @@ $scrollbarThumbColorMenuHov: pullForward($scrollbarThumbColorMenu, 2%);
|
|||||||
|
|
||||||
// Splitter
|
// Splitter
|
||||||
// All splitterD* values MUST both be either odd or even numbers
|
// All splitterD* values MUST both be either odd or even numbers
|
||||||
$splitterD: 16px;
|
$splitterD: 12px;
|
||||||
$splitterDSm: 10px; // Smaller splitter, used inside elements like a Timeline view
|
$splitterDSm: 10px; // Smaller splitter, used inside elements like a Timeline view
|
||||||
$splitterHandleD: 4px;
|
$splitterHandleD: 4px;
|
||||||
$colorSplitterBaseBg: $colorBodyBg;
|
$colorSplitterBaseBg: $colorBodyBg;
|
||||||
|
@ -8,6 +8,10 @@ $controlFadeMs: 100ms;
|
|||||||
$browseToEditAnimMs: 400ms;
|
$browseToEditAnimMs: 400ms;
|
||||||
$editBorderPulseMs: 500ms;
|
$editBorderPulseMs: 500ms;
|
||||||
|
|
||||||
|
/************************** SPATIAL */
|
||||||
$interiorMarginSm: 3px;
|
$interiorMarginSm: 3px;
|
||||||
$interiorMargin: 5px;
|
$interiorMargin: 5px;
|
||||||
$interiorMarginLg: 10px;
|
$interiorMarginLg: 10px;
|
||||||
|
$inputTextPTopBtm: 2px;
|
||||||
|
$inputTextPLeftRight: 5px;
|
||||||
|
$inputTextP: $inputTextPTopBtm $inputTextPLeftRight;
|
@ -70,6 +70,16 @@ input, textarea {
|
|||||||
letter-spacing: inherit;
|
letter-spacing: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type=text],
|
||||||
|
input[type=search],
|
||||||
|
input[type=number] {
|
||||||
|
@include nice-input();
|
||||||
|
padding: $inputTextP;
|
||||||
|
&.numeric {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h1, h2, h3 {
|
h1, h2, h3 {
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -92,4 +102,4 @@ ol, ul {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/************************** VISUALS */
|
||||||
@mixin ancillaryIcon($d, $c) {
|
@mixin ancillaryIcon($d, $c) {
|
||||||
// Used for small icons used in combination with larger icons,
|
// Used for small icons used in combination with larger icons,
|
||||||
// like the link and alert icons in tree items.
|
// like the link and alert icons in tree items.
|
||||||
@ -61,15 +62,7 @@
|
|||||||
background-size: $d $d;
|
background-size: $d $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/************************** TEXT */
|
||||||
@function percentToDecimal($p) {
|
|
||||||
@return $p / 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
@function decimalToPercent($d) {
|
|
||||||
@return percentage($d);
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin ellipsize() {
|
@mixin ellipsize() {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@ -84,4 +77,33 @@
|
|||||||
|
|
||||||
@mixin test($c: #ffcc00, $a: 0.2) {
|
@mixin test($c: #ffcc00, $a: 0.2) {
|
||||||
background-color: rgba($c, $a) !important;
|
background-color: rgba($c, $a) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************** CONTROLS */
|
||||||
|
@mixin nice-input($bg: $colorInputBg, $fg: $colorInputFg, $shdw: rgba(black, 0.5) 0 0px 2px) {
|
||||||
|
appearance: none;
|
||||||
|
background: $bg;
|
||||||
|
border: none;
|
||||||
|
color: $fg;
|
||||||
|
border-radius: $controlCr;
|
||||||
|
box-shadow: inset $shdw;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.error {
|
||||||
|
background-color: $colorFormFieldErrorBg;
|
||||||
|
color: $colorFormFieldErrorFg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************** MATH */
|
||||||
|
@function percentToDecimal($p) {
|
||||||
|
@return $p / 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@function decimalToPercent($d) {
|
||||||
|
@return percentage($d);
|
||||||
}
|
}
|
@ -2,4 +2,5 @@
|
|||||||
@import "constants";
|
@import "constants";
|
||||||
@import "constants-snow";
|
@import "constants-snow";
|
||||||
@import "glyphs";
|
@import "glyphs";
|
||||||
|
@import "mixins";
|
||||||
@import "global";
|
@import "global";
|
@ -75,7 +75,7 @@
|
|||||||
// Collapse button
|
// Collapse button
|
||||||
background: $colorSplitterBg;
|
background: $colorSplitterBg;
|
||||||
display: none; // Only display if splitter is collapsible, see below
|
display: none; // Only display if splitter is collapsible, see below
|
||||||
width: $size * 3;
|
width: $splitterD;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
transition: $transOut;
|
transition: $transOut;
|
||||||
|
|
||||||
@ -120,8 +120,6 @@
|
|||||||
content: $glyph-icon-arrow-right;
|
content: $glyph-icon-arrow-right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
<div class="l-shell__main">
|
<div class="l-shell__main">
|
||||||
<div class="l-pane l-shell__pane-tree" ref="shell-pane-tree">
|
<div class="l-pane l-shell__pane-tree" ref="shell-pane-tree">
|
||||||
<div class="l-shell__search">
|
<div class="l-shell__search">
|
||||||
<!-- Change to search component -->
|
<MctSearch ref="shell-search"></MctSearch>
|
||||||
<input placeholder="Search"/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="l-shell__tree">
|
<div class="l-shell__tree">
|
||||||
<MctTree ref="shell-tree"></MctTree>
|
<MctTree ref="shell-tree"></MctTree>
|
||||||
@ -82,8 +81,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__pane-tree {
|
&__pane-tree {
|
||||||
|
$m: $interiorMargin;
|
||||||
background: $colorTreeBg;
|
background: $colorTreeBg;
|
||||||
padding: $interiorMarginLg;
|
padding: $m $m + ($splitterD - $splitterHandleD) $m $m;
|
||||||
width: 300px
|
width: 300px
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,6 +100,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import MctInspector from './MctInspector.vue';
|
import MctInspector from './MctInspector.vue';
|
||||||
import MctMain from './MctMain.vue';
|
import MctMain from './MctMain.vue';
|
||||||
|
import MctSearch from './MctSearch.vue';
|
||||||
import MctStatus from './MctStatus.vue';
|
import MctStatus from './MctStatus.vue';
|
||||||
import MctTree from './MctTree.vue';
|
import MctTree from './MctTree.vue';
|
||||||
import splitter from '../controls/splitter.vue';
|
import splitter from '../controls/splitter.vue';
|
||||||
@ -113,6 +114,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
MctInspector,
|
MctInspector,
|
||||||
MctMain,
|
MctMain,
|
||||||
|
MctSearch,
|
||||||
MctStatus,
|
MctStatus,
|
||||||
MctTree,
|
MctTree,
|
||||||
splitter
|
splitter
|
||||||
|
26
src/ui/components/layout/MCTSearch.vue
Normal file
26
src/ui/components/layout/MCTSearch.vue
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<div class="c-search c-search-major">
|
||||||
|
<input type="search" placeholder="Search"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@import "~styles/constants";
|
||||||
|
|
||||||
|
/******************************* SEARCH */
|
||||||
|
.c-search {
|
||||||
|
|
||||||
|
&-major {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
input[type=search] {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
}
|
||||||
|
</script>
|
Reference in New Issue
Block a user