[Fronted] Significant refactoring of mixins for containers and buttons

WTD-839
Removal of 'icon-btn' class from *.html;
Cleanup of markup in switcher.html;
'name' span is now hidden when switcher is within frame;
Commented out unused css classes in _controls.scss,
Normalization of markup in object header when in main view and framed objects;
Icon sizing fixed in menus and switcher control;
Tightened up spacing in menus;
This commit is contained in:
Charles Hacskaylo
2015-06-12 11:44:09 -07:00
parent af0c2e7827
commit 8f153d4e75
12 changed files with 780 additions and 607 deletions

View File

@@ -62,17 +62,23 @@
margin-left: $interiorMarginSm;
}
/*
.object-header .type-icon {
color: $colorKey;
margin-right: $interiorMarginSm;
}
*/
.menu .type-icon,
.tree-item .type-icon,
.icon-btn .menu.dropdown .icon,
.super-menu.menu.dropdown .icon {
font-size: $menuLineH * 0.93;
.super-menu.menu .type-icon {
font-size: $menuLineH * 0.8; //.93
line-height: $menuLineH * 1.13;
position: absolute;
}
.super-menu.menu.dropdown .icon {
font-size: $menuLineH * 0.95
}

View File

@@ -25,7 +25,7 @@ $pad: $interiorMargin * $baseRatio;
/******* LAYOUT AND SIZING */
.btn,
.l-btn {
line-height: 1.2em;
line-height: 1.25em;
padding: 0 $pad;
text-decoration: none;
&.lg,

View File

@@ -19,7 +19,8 @@
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
.control {
/*.control {
// UNUSED?
&.view-control {
.icon {
display: inline-block;
@@ -45,10 +46,10 @@
}
}
}
}
}*/
.accordion {
$accordionHeadH: 18px;
$accordionHeadH: 18px;
margin-top: $interiorMargin;
&:first-child {
margin-top: 0;
@@ -56,16 +57,20 @@
.accordion-head {
$op: 0.2;
@include border-radius($basicCr * 0.75);
@include box-sizing("border-box");
@include box-sizing("border-box");
background: rgba($colorBodyFg, $op);
cursor: pointer;
font-size: 0.75em;
line-height: $accordionHeadH;
line-height: $accordionHeadH;
margin-bottom: $interiorMargin;
padding: 0 $interiorMargin;
position: absolute;
top: 0; right: 0; bottom: auto; left: 0;
width: auto; height: $accordionHeadH;
top: 0;
right: 0;
bottom: auto;
left: 0;
width: auto;
height: $accordionHeadH;
text-transform: uppercase;
&:hover {
background: rgba($colorBodyFg, $op * 2);
@@ -84,12 +89,15 @@
content: "v";
}
}
.accordion-contents {
position: absolute;
top: $accordionHeadH + $interiorMargin; right: 0; bottom: 0; left: 0;
overflow-y: auto;
overflow-x: hidden;
}
.accordion-contents {
position: absolute;
top: $accordionHeadH + $interiorMargin;
right: 0;
bottom: 0;
left: 0;
overflow-y: auto;
overflow-x: hidden;
}
}
.btn-bar {
@@ -98,12 +106,12 @@
.btn-set,
.t-btn {
display: inline-block;
// margin-left: $interiorMargin;
// margin-left: $interiorMargin;
}
.btn,
.t-btn {
&:first-child {
// margin-left: 0;
// margin-left: 0;
}
}
}
@@ -136,7 +144,8 @@
// Default position is upper right
$p: $interiorMargin;
position: absolute;
top: $p; right: $p;
top: $p;
right: $p;
z-index: 5;
}
@@ -175,8 +184,8 @@
height: $h;
line-height: $h;
.icon:not(.invoke-menu) {
// position: relative;
// top: -0.04em;
// position: relative;
// top: -0.04em;
font-size: 150%;
vertical-align: middle;
}
@@ -266,34 +275,40 @@ label.checkbox.custom {
$p: $interiorMarginSm * 2;
$c: $colorBodyFg;
@include btnSubtle($colorBodyBg);
height: $h;
/* height: $h;
line-height: $h;
&.dropdown {
// padding-left: $p;
padding-left: $p;
padding-right: $p;
}
}*/
&:not(.disabled):hover {
color: lighten($c, 20%);
}
&.btn-invoke-menu {
/* &.context-available {
// An element like the invoke-menu triangle;
// Indicates that this element has a dropdown menu available;
// Currently unused
$c: $colorKey;
color: $c;
padding: 0 5px;
&:hover {
color: lighten($c, 10%);
}
}*/
span.l-click-area {
// In markup, this element should not enclose anything.
@extend .abs;
}
span.l-click-area {
// In markup, this element should not enclose anything.
@extend .abs;
}
.type-icon {
margin-right: $interiorMargin;
//margin-right: $interiorMargin;
}
.name {
margin-left: $interiorMargin;
}
.menu {
// margin-left: (-1 * $p);
@@ -337,13 +352,15 @@ label.checkbox.custom {
.object-header {
display: inline-block;
font-size: 1em;
.title {
color: lighten($colorBodyFg, 40%);
}
.type-icon {
font-size: 1.5em;
margin-right: $interiorMargin;
vertical-align: middle;
.label {
.title-label {
color: lighten($colorBodyFg, 40%);
}
.type-icon {
font-size: 1.5em;
margin-right: $interiorMargin;
vertical-align: middle;
}
}
}
@@ -376,15 +393,18 @@ label.checkbox.custom {
}
}*/
.frame .t-view-switcher {
// Hide the name when the view switcher is in a frame context
.name {
display: none;
}
}
.edit-mode .top-bar .control-set.edit-view-controls {
// Used in templates/edit-view-controls.html
margin-right: $interiorMargin * 10;
}
.frame .t-view-switcher {
// Style the view switcher when in a frame
}
/******************************************************** SLIDERS */
.slider {
@@ -392,7 +412,7 @@ label.checkbox.custom {
$knobW: 12px;
$slotH: 50%;
.slot {
// @include border-radius($basicCr * .75);
// @include border-radius($basicCr * .75);
@include sliderTrack();
height: $slotH;
width: auto;
@@ -439,23 +459,23 @@ label.checkbox.custom {
/******************************************************** BROWSER ELEMENTS */
::-webkit-scrollbar {
@include sliderTrack();
height: $scrollbarTrackSize;
width: $scrollbarTrackSize;
@include sliderTrack();
height: $scrollbarTrackSize;
width: $scrollbarTrackSize;
}
::-webkit-scrollbar-thumb {
$bg: lighten($colorBodyBg, 10%);
@include background-image(linear-gradient(lighten($bg, 10%), lighten($bg, 5%) 20px));
@include border-radius(1px);
@include box-sizing(border-box);
@include boxShdwSubtle();
border-top: 1px solid lighten($bg, 20%);
&:hover {
@include background-image(linear-gradient(lighten($bg, 20%), lighten($bg, 15%) 20px));
}
$bg: lighten($colorBodyBg, 10%);
@include background-image(linear-gradient(lighten($bg, 10%), lighten($bg, 5%) 20px));
@include border-radius(1px);
@include box-sizing(border-box);
@include boxShdwSubtle();
border-top: 1px solid lighten($bg, 20%);
&:hover {
@include background-image(linear-gradient(lighten($bg, 20%), lighten($bg, 15%) 20px));
}
}
::-webkit-scrollbar-corner {
background: rgba(#000, 0.4);
background: rgba(#000, 0.4);
}

View File

@@ -41,7 +41,7 @@
@include box-sizing(border-box);
border-top: 1px solid lighten($bg, 20%);
line-height: $menuLineH;
padding: $interiorMarginSm $interiorMargin * 2 $interiorMarginSm ($interiorMargin * 3) + $treeTypeIconW;
padding: $interiorMarginSm $interiorMargin * 2 $interiorMarginSm ($interiorMargin * 2) + $treeTypeIconW;
white-space: nowrap;
&:first-child {
border: none;

View File

@@ -75,8 +75,8 @@ ul.tree {
.title-label {
@include absPosDefault();
display: block;
left: $runningItemW + ($interiorMargin * 2);
// right: $treeContextTriggerW + $interiorMargin; //Disabling as context trigger not being used
left: $runningItemW + ($interiorMargin);
//right: $treeContextTriggerW + $interiorMargin;
overflow: hidden;
text-overflow: ellipsis;
// height: $menuLineH;
@@ -124,16 +124,15 @@ ul.tree {
&:not(.loading) {
cursor: pointer;
// @include tree-item-hover();
}
.context-trigger {
$h: 0.9rem;
display: none;
//display: none;
top: -1px;
position: absolute;
right: $interiorMarginSm;
.btn-invoke-menu {
.invoke-menu {
font-size: 0.75em;
height: $h;
line-height: $h;