Skip to content

Commit

Permalink
[Frontend] Standardizing styles
Browse files Browse the repository at this point in the history
Fixes #1047
- Finessing mini-tab and making able to
control per theme; s-clickable and s-toggle-icon
classes cleaned up
  • Loading branch information
charlesh88 committed Jul 28, 2016
1 parent 18e0807 commit 3e7eb98
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
5 changes: 2 additions & 3 deletions platform/commonUI/general/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ $ueColMargin: 1.5%;
$ueAppLogoW: 80px;
$ueEditToolBarH: 25px;
$ueCollapsedPaneEdgeM: 22px;
$uePaneMiniTabH: $ueTopBarH;
$uePaneMiniTabH: 22px;
$uePaneMiniTabW: 10px;
$uePaneMiniTabW: 8px;
$uePaneMiniTabFontSize: 8px;
$uePaneMiniTabCollapsedW: 18px;
$ueEditLeftPaneW: 75%;
Expand Down Expand Up @@ -75,7 +74,7 @@ $treeTypeIconHPx: 16px;
$treeTypeIconW: 18px;
$treeContextTriggerW: 20px;
/*************** Tabular */
$tabularHeaderH: 22px; //18px
$tabularHeaderH: 22px;
$tabularTdPadLR: $itemPadLR;
$tabularTdPadTB: 3px;
/*************** Imagery */
Expand Down
6 changes: 2 additions & 4 deletions platform/commonUI/general/res/sass/controls/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,8 @@ body.desktop .mini-tab-icon {
overflow: hidden;
text-align: center;

&:before,
&:after {
display: block;
position: absolute;
&:before {
display: inline-block;
}

&:hover {
Expand Down
21 changes: 12 additions & 9 deletions platform/commonUI/general/res/sass/controls/_controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,21 @@

.s-clickable-icon {
// Clickable icon elements that have hover
// .s-toggles means the element is capable of having .active applied to it
@extend .ui-symbol;
color: $colorClickIcon;
&:hover { color: $colorClickIconHov; }
&.s-toggles {
color: rgba($colorClickIcon, 0.5) !important;
&.active { color: $colorClickIconActive !important; }
&:hover { color: rgba($colorClickIconHov, 0.5) !important; }
&:hover {
color: $colorClickIconHov;
}
}

.s-toggle-icon {
// Has default (in-active) and .active states
@extend .s-clickable-icon;
color: $colorToggleIcon;
&:hover { color: rgba($colorToggleIconHov, 0.5); }
&.active { color: $colorToggleIconActive; }
}

.l-composite-control {
vertical-align: middle;
&:not(.l-inline) {
Expand Down Expand Up @@ -555,10 +559,9 @@ textarea {
/******************************************************** MISC */
.context-available {
@extend .icon-arrow-down;
$c: $colorKey;
color: $c;
color: $colorKey;
&:hover {
color: lighten($c, 10%);
color: $colorKeyHov;
}
}

Expand Down
13 changes: 8 additions & 5 deletions platform/commonUI/themes/espresso/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $colorStatusBarBg: #000;
$colorKey: #0099cc;
$colorKeySelectedBg: #005177;
$colorKeyFg: #fff;
$colorKeyHov: pullForward($colorKey, 20%);
$colorKeyHov: #00c0f6;
$colorEditAreaBg: #31363e;
$colorEditAreaFg: #587ab5;
$colorInteriorBorder: rgba($colorBodyFg, 0.1);
Expand All @@ -29,10 +29,11 @@ $colorBtnMajorBg: $colorKey;
$colorBtnMajorBgHov: pullForward($colorBtnMajorBg, $hoverRatioPercent);
$colorBtnMajorFg: $colorKeyFg;
$colorBtnMajorFgHov: pullForward($colorBtnMajorFg, $hoverRatioPercent);
// TODO: make clickable icon initially use the key color; also, introduce a toggle-able icon with different color approach
$colorClickIcon: $colorBodyFg;
$colorClickIconActive: $colorKey;
$colorClickIconHov: $colorClickIconActive;
$colorClickIcon: $colorKey;
$colorClickIconHov: $colorKeyHov;
$colorToggleIcon: rgba($colorBodyFg, 0.5);
$colorToggleIconActive: $colorKey;
$colorToggleIconHov: rgba($colorToggleIconActive, 0.5);
$colorInvokeMenu: #fff;
$contrastInvokeMenuPercent: 20%;
$shdwBtns: rgba(black, 0.2) 0 1px 2px;
Expand Down Expand Up @@ -204,6 +205,8 @@ $colorSplitterHover: pullForward($colorSplitterBg, $hoverRatioPercent);
$colorSplitterActive: $colorKey;

// Minitabs
$uePaneMiniTabH: 24px;
$uePaneMiniTabW: 8px;
$colorMiniTabBg: $colorSplitterBg;
$colorMiniTabFg: pushBack($colorMiniTabBg, 10%);
$colorMiniTabBgHov: $colorSplitterHover;
Expand Down
14 changes: 9 additions & 5 deletions platform/commonUI/themes/snow/res/sass/_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $colorStatusBarBg: #000;
$colorKey: #0099cc;
$colorKeySelectedBg: $colorKey;
$colorKeyFg: #fff;
$colorKeyHov: pullForward($colorKey, 20%);
$colorKeyHov: #00c0f6;
$colorEditAreaBg: #eafaff;
$colorEditAreaFg: #4bb1c7;
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
Expand All @@ -26,12 +26,14 @@ $colorBtnFgHov: $colorBtnFg;
$colorBtnIcon: #eee;
$colorBtnIconHov: $colorBtnFgHov;
$colorBtnMajorBg: $colorKey;
$colorBtnMajorBgHov: #007fbc;
$colorBtnMajorBgHov: $colorKeyHov;
$colorBtnMajorFg: $colorKeyFg;
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, $hoverRatioPercent);
$colorClickIcon: $colorBodyFg;
$colorClickIconActive: $colorKey;
$colorClickIconHov: $colorClickIconActive;
$colorClickIcon: $colorKey;
$colorClickIconHov: $colorKeyHov;
$colorToggleIcon: rgba($colorClickIcon, 0.5);
$colorToggleIconActive: $colorKey;
$colorToggleIconHov: rgba($colorToggleIconActive, 0.5);
$colorInvokeMenu: #000;
$contrastInvokeMenuPercent: 40%;
$shdwBtns: none;
Expand Down Expand Up @@ -203,6 +205,8 @@ $colorSplitterHover: pullForward($colorSplitterBg, $hoverRatioPercent * 2);
$colorSplitterActive: $colorKey;

// Minitabs
$uePaneMiniTabH: 24px;
$uePaneMiniTabW: 8px;
$colorMiniTabBg: $colorSplitterBg;
$colorMiniTabFg: pullForward($colorMiniTabBg, 30%);
$colorMiniTabBgHov: $colorSplitterHover;
Expand Down
7 changes: 0 additions & 7 deletions platform/features/timeline/res/sass/_timelines.scss
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,6 @@
top: $timelineTopPaneHeaderElemMargin; bottom: $timelineTopPaneHeaderElemMargin;
}

.l-swimlanes-holder .l-cols {
.l-col-icon,
.l-col-icon a:not(.s-toggles) {
color: $colorKey;
}
}

.l-pane-l {
// Left pane of the tabular area
.l-cols {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<span class="l-col l-col-icon l-plot-resource"
ng-click="ngModel.toggleGraph(); parameters.commit()"
title="Click to enable or disable inclusion in Resource Graphing">
<span class="icon-plot-resource s-clickable-icon s-toggles"
<span class="icon-plot-resource s-toggle-icon"
ng-class="{ active: ngModel.graph() }">
</span>
</span>
Expand Down

0 comments on commit 3e7eb98

Please sign in to comment.