Files
openmct/platform/commonUI/general/res/sass/tree/_tree.scss
Charles Hacskaylo 9b32461240 [Frontend] Converting tree items and labels to flex-box
open #431
In-progress fixing mobile;
Mostly done, link icon in mobile needs
better positioning;
2015-12-16 13:26:30 -08:00

146 lines
3.8 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);
font-size: 0.8rem;
height: $menuLineH;
line-height: $menuLineH;
margin-bottom: $interiorMarginSm;
padding: 0 $interiorMarginSm;
position: relative;
.view-control {
color: $colorItemTreeVC;
font-size: 0.75em;
margin-right: $interiorMargin;
height: 100%; //$menuLineH;
line-height: inherit;
width: $treeVCW;
&.has-children {
&:before {
position: absolute;
@include trans-prop-nice(transform, 100ms);
content: "\3e";
@include transform-origin(center);
}
&.expanded:before {
@include transform(rotate(90deg));
}
}
@include desktop {
&:hover {
color: $colorItemTreeVCHover !important;
}
}
}
.t-object-label {
line-height: $menuLineH;
.t-item-icon {
@include txtShdwSubtle($shdwItemTreeIcon);
font-size: $treeTypeIconH;
color: $colorItemTreeIcon;
width: $treeTypeIconH;
}
.title-label,
.t-title-label {
@include ellipsize();
}
}
&.selected {
background: $colorItemTreeSelectedBg;
color: $colorItemTreeSelectedFg;
.view-control {
color: $colorItemTreeSelectedVC;
}
.t-object-label .t-item-icon {
color: $colorItemTreeSelectedFg; //$colorItemTreeIconHover;
}
}
&:not(.selected) {
// NOTE: [Mobile] Removed Hover on Mobile
@include desktop {
&:hover {
background: $colorItemTreeHoverBg;
color: $colorItemTreeHoverFg;
.t-item-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 {
mct-representation {
//.t-object-label {
// left: $interiorMargin + $treeVCW;
//}
&.s-status-pending {
.t-object-label {
&:before {
@include spinner(0.25em, $colorItemTreeIcon);
content: "";
}
.t-item-icon .t-item-icon-glyph {
display: none;
}
}
}
}
}