Files
openmct/platform/commonUI/general/res/sass/tree/_tree.scss
Charles Hacskaylo 134d853f19 [Frontend] type-icon evolving to universal t-item-icon
open #90
Major work in-progress on switching to .t-item-icon from
.type-icon to get item icons working better, especially
in .inspector-location in Inspector;
Significant mods to label.html;
2015-10-28 00:24:57 -07:00

165 lines
4.0 KiB
SCSS

/*****************************************************************************
* Open MCT Web, Copyright (c) 2014-2015, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT Web 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 Web 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.
*****************************************************************************/
ul.tree {
@include menuUlReset();
@include user-select(none);
li {
display: block;
position: relative;
}
ul.tree {
margin-left: $treeVCW + $interiorMargin;
}
}
.tree-item,
.search-result-item {
$runningItemW: 0;
@include box-sizing(border-box);
@include border-radius($basicCr);
@include single-transition(background-color, 0.25s);
display: block;
font-size: 0.8rem;
height: $menuLineH;
line-height: $menuLineH;
margin-bottom: $interiorMarginSm;
position: relative;
.view-control {
color: $colorItemTreeVC;
display: inline-block;
margin-left: $interiorMargin;
font-size: 0.75em;
width: $treeVCW;
$runningItemW: $interiorMargin + $treeVCW;
@include desktop {
&:hover {
color: $colorItemTreeVCHover !important;
}
}
}
.label,
.t-object-label {
display: block;
@include absPosDefault();
line-height: $menuLineH;
.t-item-icon {
$d: $treeTypeIconH; // 16px is crisp size
@include txtShdwSubtle($shdwItemTreeIcon);
font-size: $d;
color: $colorItemTreeIcon;
position: absolute;
left: $interiorMargin; right: auto; width: $d;
}
.type-icon {
//@include absPosDefault(0, false);
$d: $treeTypeIconH; // 16px is crisp size
@include txtShdwSubtle($shdwItemTreeIcon);
font-size: $d;
color: $colorItemTreeIcon;
left: $interiorMargin;
position: absolute;
@include verticalCenterBlock($menuLineHPx, $d);
line-height: 100%;
right: auto; width: $d;
.icon {
&.l-icon-link,
&.l-icon-alert {
position: absolute;
z-index: 2;
}
&.l-icon-alert {
$d: 8px;
@include ancillaryIcon($d, $colorAlert);
top: 1px;
right: -2px;
}
&.l-icon-link {
$d: 8px;
@include ancillaryIcon($d, $colorIconLink);
left: -3px;
bottom: 0px;
}
}
}
.title-label,
.t-title-label {
@include absPosDefault();
display: block;
left: $runningItemW + ($interiorMargin * 3);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
&.selected {
background: $colorItemTreeSelectedBg;
color: $colorItemTreeSelectedFg;
.view-control {
color: $colorItemTreeSelectedVC;
}
.label .type-icon {
color: $colorItemTreeSelectedFg; //$colorItemTreeIconHover;
}
}
&:not(.selected) {
// NOTE: [Mobile] Removed Hover on Mobile
@include desktop {
&:hover {
background: $colorItemTreeHoverBg;
color: $colorItemTreeHoverFg;
.icon {
color: $colorItemTreeIconHover;
}
}
}
}
&:not(.loading) {
cursor: pointer;
}
.context-trigger {
$h: 0.9rem;
top: -1px;
position: absolute;
right: $interiorMarginSm;
.invoke-menu {
font-size: 0.75em;
height: $h;
line-height: $h;
}
}
}
.tree-item {
.t-object-label {
left: $interiorMargin + $treeVCW;
}
}