Files
PurpleMine2/src/sass/components/_elements.scss

939 lines
15 KiB
SCSS

//
// Various layout elements
// --------------------------------------------------
//== Collapsible
//
a.collapsible,
.collapsible > legend {
color: $link-color;
cursor: pointer;
user-select: none;
&:hover {
color: $link-hover-color;
}
&::before {
display: inline-block;
position: relative;
top: -1px;
width: 0;
height: 0;
margin-right: 3px;
transform: rotate(0);
border-top: 6px solid;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
vertical-align: middle;
@if $collapsible-animation-time > 0 {
transition: transform $collapsible-animation-time;
}
}
}
a.collapsible.collapsed,
.collapsible.collapsed > legend {
&::before {
transform: rotate(-90deg);
}
}
@if $collapsible-animation-time > 0 {
fieldset.collapsible {
min-height: $line-height-computed;
max-height: 2500px; // should be enough with all the possible filters
transition: max-height $collapsible-animation-time ease-out;
overflow: hidden;
> div {
display: block !important; // scss-lint:disable ImportantRule
transition: visibility 0s 0s, opacity $collapsible-animation-time;
opacity: 1;
visibility: visible;
}
&.collapsed {
max-height: 0;
transition: max-height $collapsible-animation-time;
> div {
transition: visibility 0s $collapsible-animation-time, opacity $collapsible-animation-time;
opacity: 0;
visibility: hidden;
}
}
}
}
//== Elements with context menus (doesn't really work on Windows)
//
.hascontextmenu {
cursor: context-menu;
}
//== Actions for block
//
.contextual {
float: right;
cursor: default;
input,
select {
font-size: .9em;
}
a {
display: inline-block;
white-space: nowrap;
&:not(:first-child) {
margin-left: $padding-small-vertical;
}
}
}
//== Accessibility specific styles
//
.hidden-for-sighted {
position: absolute;
top: auto;
left: -10000px;
width: 1px;
height: 1px;
overflow: hidden;
}
//== Responsive autoscroll
//
.autoscroll {
overflow-x: auto;
margin-bottom: $line-height-computed;
}
//== Container
//
.box {
margin-bottom: $line-height-computed;
padding: $panel-body-padding;
border: 1px solid $panel-border;
border-radius: $border-radius-base;
background-color: $panel-bg;
color: $panel-color;
word-wrap: break-word;
.ui-dialog-content & {
padding: 0;
border: 0 none;
background: transparent;
box-shadow: none;
}
&:last-child,
>:last-child {
margin-bottom: 0;
}
> h3 {
margin-bottom: $panel-body-padding-vertical;
}
}
//== Column form layout
//
.splitcontent {
@extend %clearfix;
}
.splitcontentleft,
.splitcontentright {
width: 50%;
box-sizing: border-box;
> .wiki {
margin-bottom: $line-height-computed;
}
}
.splitcontentleft {
padding-right: ($padding-side / 2);
float: left;
}
.splitcontentright {
padding-left: ($padding-side / 2);
float: right;
}
//== Watchers selection list
//
#users_for_watcher {
height: 200px;
overflow: auto;
label {
@include checkbox;
display: block;
}
}
//== Watchers list
//
#watchers {
select {
display: block;
width: 100%;
}
> .watchers {
> li {
@extend %clearfix;
display: block;
margin-bottom: $sidebar-padding-vertical;
@if $sidebar-position == "left" {
padding-right: $sidebar-padding-horizontal;
} @else {
padding-left: $sidebar-padding-horizontal;
}
> a {
display: inline;
padding: 0;
background: transparent;
}
> .delete {
float: right;
opacity: .5;
vertical-align: middle;
&:hover {
opacity: 1;
}
}
img.gravatar {
position: relative;
top: 1px;
margin-right: .5em;
vertical-align: top;
}
}
}
}
//== Subtitle paragraph (can be seen on activity list)
//
p.subtitle {
margin-top: ($line-height-computed / -2);
margin-bottom: $line-height-computed;
font-style: italic;
}
//== My page layout
//
#block-form {
display: inline;
}
.block-receiver {
min-height: 20px;
margin: $padding-side / -2;
margin-bottom: $line-height-computed;
padding: $padding-side / 2;
outline: 2px dashed $gray-light;
}
.mypage-box {
margin-bottom: $line-height-computed;
&:last-child {
margin-bottom: 0;
}
&.ui-sortable-handle {
outline: 1px solid $gray-lighter;
overflow: hidden;
&:hover {
outline: 1px solid $gray-light;
}
}
&.ui-sortable-placeholder {
outline: 1px dashed $highlight-border;
background: $highlight-bg;
visibility: visible !important; // scss-lint:disable ImportantRule
}
&.ui-sortable-helper {
@include nice-shadow(4);
background: $body-bg;
}
}
.handle {
cursor: move;
}
a.close-icon {
display: block;
width: 12px;
height: 12px;
margin-top: 5px;
background-image: url("../../../images/close.png");
background-repeat: no-repeat;
cursor: pointer;
overflow: hidden;
&:hover {
background-image: url("../../../images/close_hl.png");
}
}
//== Resetting font for SCM (repository files)
//
#content table.filecontent {
width: 100%;
background: $body-bg;
th.filename {
border-color: $brand-primary;
border-bottom-color: darken($body-bg, 10%);
background-color: $brand-primary;
color: $brand-text;
}
tbody {
font-size: $font-size-list;
}
tbody,
td.line-code pre {
font-family: $font-family-monospace;
}
th.line-num {
border-color: darken($body-bg, 10%);
background-color: darken($body-bg, 5%);
color: $gray;
}
th.line-num,
td.line-code {
padding: .15em .4em;
}
th.line-num,
td.line-code,
td.line-code pre {
font-size: 1em;
}
tr:hover {
background-color: darken($body-bg, 2%);
th.line-num {
background-color: darken($body-bg, 10%);
}
}
tr:target {
th.line-num {
border-color: darken(adjust-hue($highlight-bg, -8deg), 15%);
background-color: darken(adjust-hue($highlight-bg, -8deg), 7%);
color: $highlight-text;
}
td.line-code {
background-color: $highlight-bg;
}
}
}
#browser {
font-size: 1em;
tr {
border: 0 none;
}
td {
padding: $table-condensed-cell-padding;
border: 0 none;
}
}
//== Projects list
//
ul.projects {
padding-left: $padding-side;
&.root {
margin: 0;
padding: 0;
}
li {
list-style-type: none;
}
}
#projects-index ul.projects {
ul.projects {
border-left: 2px solid $gray-lighter;
}
li.root {
margin-bottom: $line-height-computed;
}
li.child {
margin-top: $line-height-computed / 2;
}
a.project {
font-size: $font-size-h3;
font-weight: $font-weight-bold;
&.child {
font-weight: normal;
}
}
}
#custom_field_tracker_ids {
label {
margin-right: 10px;
}
}
#notified-projects,
#tracker_project_ids,
#custom_field_project_ids {
> ul {
max-height: $line-height-computed * 12;
overflow-y: auto;
}
}
//== Time report
//
#time-report {
th {
&.period,
&.total {
text-align: right;
}
}
tbody tr {
&.subtotal {
color: $gray;
font-style: italic;
td.hours {
color: $gray-light;
}
}
&.total {
border-top: 2px solid darken($table-border-color, 5%);
background-color: $table-bg-active;
font-weight: $font-weight-bold;
}
}
td.hours {
text-align: right;
}
}
.total-hours {
font-weight: $font-weight-bold;
.hours-int {
font-size: $font-size-large * 1.1;
}
.hours-dec {
font-size: $font-size-large;
}
}
//== Version issue list and page layout
//
div#roadmap {
.related-issues {
margin-bottom: $line-height-computed;
td.checkbox {
display: none;
}
}
table.progress {
td {
height: 16px;
}
+ .percent {
position: relative;
top: 2px;
}
}
.wiki {
h1 {
&:first-child {
display: none;
}
}
}
}
body.controller-versions.action-show div#roadmap .related-issues {
width: 70%;
}
div#version-summary {
width: 28%;
float: right;
fieldset {
margin-bottom: $line-height-computed;
&.time-tracking table {
width: 100%;
}
}
th,
td.total-hours {
text-align: right;
}
}
//== Add form bottom space
//
#new_document,
#add-message,
#add-news,
#edit-news {
margin-bottom: $line-height-computed;
}
//== Ajax indicator
//
#ajax-indicator {
@include nice-shadow(3);
position: fixed;
top: 50%;
left: 50%;
width: 200px;
margin: (($line-height-computed + $padding-large-vertical * 2 + 1px * 2) / -2) ((200px + $padding-large-horizontal * 2 + 1px * 2) / -2);
padding: $padding-large-vertical $padding-large-horizontal;
border: 1px solid $highlight-border;
background-color: $highlight-bg;
color: $highlight-text;
font-weight: $font-weight-bold;
text-align: center;
opacity: .9;
z-index: 100;
span {
padding-left: 26px;
background-image: url("../../../images/loading.gif");
background-repeat: no-repeat;
background-position: 0% 40%;
vertical-align: bottom;
}
}
//== Boards (forum)
//
tr.message {
&.locked {
color: $gray;
}
&.sticky td.subject {
font-weight: $font-weight-bold;
}
td {
&.created_on {
white-space: nowrap;
}
&.last_message {
width: 30%;
text-align: left;
white-space: nowrap;
a:last-child {
font-weight: $font-weight-bold;
}
}
}
}
table.boards {
td {
&.last-message {
width: 30%;
text-align: left;
white-space: nowrap;
a:last-child {
font-weight: $font-weight-bold;
}
}
}
}
div.table-list.boards {
.table-list-cell.name {
width: 30%;
}
}
//== Topic page
//
.controller-messages.action-show {
h2 {
margin-bottom: $line-height-computed / 2;
}
.message {
border: 1px solid $gray-lighter;
border-radius: $panel-border-radius;
background: $gray-lightest;
> h4,
> p {
margin-bottom: 0;
padding: $bubble-padding-vertical $bubble-padding-horizontal;
border-bottom: 1px solid mix($gray-lighter, $gray-lightest, 50%);
color: $gray;
font-size: $font-size-list;
a {
color: $gray-darker;
&.user {
font-weight: $font-weight-bold;
}
}
}
.wiki {
padding: $bubble-padding-horizontal;
border-radius: 0 0 $panel-border-radius $panel-border-radius;
background: $body-bg;
}
.contextual {
position: relative;
margin-right: $bubble-padding-vertical;
z-index: 1;
@if $use-font-awesome {
margin-top: $padding-small-vertical;
} @else {
margin-top: $bubble-padding-vertical;
}
a {
margin-left: ceil($bubble-padding-vertical / 2);
}
}
}
.reply {
margin-bottom: $line-height-computed;
}
@if $use-gravatars {
.reply {
margin-left: $bubble-gravatar-size + $bubble-gravatar-space;
> h4 {
position: relative;
&::before,
&::after {
display: block;
position: absolute;
top: 9px;
right: 100%;
left: -14px;
width: 0;
height: 0;
border-style: solid solid outset;
border-color: transparent;
content: " ";
pointer-events: none;
}
&::after {
margin-top: 1px;
margin-left: 2px;
border-width: 6px;
border-right-color: $panel-bg;
}
&::before {
border-width: 7px;
border-right-color: $panel-border;
}
}
img.gravatar {
margin-top: $line-height-computed - $bubble-gravatar-size;
margin-left: -($bubble-gravatar-size + $bubble-gravatar-space + $bubble-padding-horizontal + 1px);
float: left;
}
}
}
}
#message_content {
height: $line-height-computed * 6;
}
//== News
//
.news-article {
margin-bottom: $line-height-computed;
header {
h3 {
margin-bottom: .3em;
line-height: 1.2;
> a {
font-weight: $font-weight-bold;
}
}
}
}
.author .user {
font-weight: $font-weight-bold;
}
//== News comments
//
#comments {
> h4 {
margin-top: $line-height-computed;
margin-bottom: $line-height-computed / 2;
}
}
#comment_comments {
height: $line-height-computed * 6;
}
.summary {
font-style: italic;
}
//== Diff
//
.text-diff {
margin-bottom: $line-height-computed;
padding: $panel-body-padding;
border: 1px solid $panel-border;
border-radius: $panel-border-radius;
background: $body-bg;
color: $panel-color;
}
.diff_out {
background: $diff-out-bg-light;
span {
background: $diff-out-bg;
}
}
.diff_in {
background: $diff-in-bg-light;
span {
background: $diff-in-bg;
}
}
//== Repository view
//
.revision-info {
margin-bottom: $line-height-computed;
tbody > tr > td {
padding-right: $table-cell-padding;
padding-bottom: $table-condensed-cell-padding;
+ td {
font-family: $font-family-monospace;
}
}
}
#related-issues {
margin: $line-height-computed 0;
li > a {
margin-left: .5em;
@if $use-font-awesome == false {
img {
vertical-align: middle;
}
}
}
}
ul.properties {
padding: 0;
color: $gray;
font-size: $font-size-small;
li {
list-style-type: none;
span {
font-style: italic;
}
}
}
tr.changeset {
td.revision_graph {
width: 15%;
background-color: #fffffb;
}
td.id {
font-family: $font-family-monospace;
}
td.author,
td.committed_on {
width: 15%;
text-align: center;
white-space: nowrap;
}
td.comments {
p {
margin-bottom: 0;
}
}
ul {
margin-top: 0;
margin-bottom: 0;
}
}
#content #changes-legend {
font-size: 1em;
.change {
background-position: 5px center;
}
.change-A { color: $changeset-add-color; }
.change-M { color: $changeset-modified-color; }
.change-C { color: $changeset-copied-color; }
.change-R { color: $changeset-renamed-color; }
.change-D { color: $changeset-deleted-color; }
}
.changeset-changes {
.change {
padding-top: $table-condensed-cell-padding;
color: $gray-dark;
a {
@include link-variant($gray-dark);
}
}
.change-A {
&::before { color: $changeset-add-color; }
a { @include link-variant($changeset-add-color); }
}
.change-M {
&::before { color: $changeset-modified-color; }
a { @include link-variant($changeset-modified-color); }
}
.change-C {
&::before { color: $changeset-copied-color; }
a { @include link-variant($changeset-copied-color); }
}
.change-R {
&::before { color: $changeset-renamed-color; }
a { @include link-variant($changeset-renamed-color); }
}
.change-D {
color: $changeset-deleted-color;
}
}