discourse/app/assets/stylesheets/common/base/header.scss

345 lines
6.8 KiB
SCSS
Raw Normal View History

.d-header {
width: 100%;
position: absolute;
top: 0;
z-index: 1001;
background-color: $header_background;
2014-10-10 18:31:54 -04:00
box-shadow: 0 2px 4px -1px rgba(0,0,0, .25);
.docked & {
position: fixed;
backface-visibility: hidden; /** do magic for scrolling performance **/
}
.contents {
margin: 8px 0;
}
.title {
float: left;
}
.valign-helper {
display: inline-block;
height: 100%;
vertical-align: middle;
}
#site-logo {
max-height: 40px;
}
.fa-home {
font-size: 1.643em;
}
.panel {
float: right;
position: relative;
}
2015-07-06 08:42:37 -04:00
.login-button, button.sign-up-button {
float: left;
margin-top: 7px;
padding: 6px 10px;
.fa { margin-right: 3px; }
}
2014-08-12 13:47:01 -04:00
button.login-button {
2014-08-12 13:47:01 -04:00
margin-left: 7px;
}
.icons {
float: left;
text-align: center;
margin: 0 0 0 5px;
list-style: none;
2014-10-20 09:54:36 -04:00
> li {
float: left;
}
.icon {
display: block;
padding: 3px;
color: dark-light-choose(scale-color($header_primary, $lightness: 50%), $header_primary);
text-decoration: none;
cursor: pointer;
border-top: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
2014-12-23 06:09:17 -05:00
transition: all linear .15s;
&:hover {
color: $primary;
background-color: dark-light-diff($primary, $secondary, 90%, -60%);
border-top: 1px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
}
&:active {
color: $primary;
background-color: dark-light-diff($primary, $secondary, 90%, -60%);
}
}
.active .icon {
position: relative;
color: #7b7b7b;
background-color: $secondary;
cursor: default;
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border-left: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
border-right: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
&:after {
display: block;
position: absolute;
top: 100%;
left: 0;
z-index: 1101;
width: 100%;
height: 0;
content: "";
border-top: 1px solid $secondary;
}
&:hover {
border-bottom: none;
}
}
[class^="fa fa-"] {
width: 32px;
height: 32px;
font-size: 1.714em;
line-height: 32px;
display: inline-block;
}
.notifications {
position: relative;
}
.badge-notification {
position: absolute;
top: -9px;
z-index: 1;
margin-left: 0;
}
.unread-notifications {
right: -4px;
2014-07-25 23:06:14 -04:00
background-color: scale-color($tertiary, $lightness: 50%);
}
.unread-private-messages {
left: -4px;
}
}
.flagged-posts {
2014-07-25 23:06:14 -04:00
background: $danger;
}
}
.d-dropdown {
display: none;
position: absolute;
background: $secondary;
max-height: 417px;
top: 100%;
right: 0;
z-index: 1100;
overflow: auto;
border: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
2014-06-03 21:56:50 -04:00
padding: 5px;
box-shadow: 0 2px 2px rgba(0,0,0, .4);
ul {
margin: 0;
list-style: none;
}
2014-07-04 02:20:41 -04:00
li:not(.category):not(.heading) {
font-size: 0.929em;
line-height: 16px;
2014-06-03 21:56:50 -04:00
2014-07-04 02:20:41 -04:00
.fa {
font-size: inherit;
2014-07-04 02:20:41 -04:00
}
2014-06-03 21:56:50 -04:00
2014-07-04 02:20:41 -04:00
a {
display: block;
padding: 5px;
2014-12-23 06:09:17 -05:00
transition: all linear .15s;
2014-06-27 19:42:43 -04:00
}
2014-06-03 21:56:50 -04:00
2014-07-04 02:20:41 -04:00
&:hover a:not(.badge-notification) {
2015-08-21 15:44:26 -04:00
background-color: dark-light-diff($highlight, $secondary, 50%, -55%);
2014-07-04 02:20:41 -04:00
}
button {margin-left: 5px;}
}
.heading a:hover {
2015-08-21 15:44:26 -04:00
background-color: dark-light-diff($highlight, $secondary, 50%, -55%);
}
.selected {
2015-05-19 21:10:40 -04:00
background-color: dark-light-diff($tertiary, $secondary, 85%, -65%);
}
2014-06-03 21:56:50 -04:00
// Notifications
&#notifications-dropdown {
.fa { color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)); }
.icon { color: dark-light-choose(scale-color($primary, $lightness: 30%), scale-color($secondary, $lightness: 70%)); }
li {
2015-05-19 21:10:40 -04:00
background-color: dark-light-diff($tertiary, $secondary, 85%, -65%);
i {
float: left;
margin-right: 5px;
2014-08-06 13:08:12 -04:00
padding-top: 2px;
}
span { color: $primary; }
2015-08-21 15:44:26 -04:00
&:hover a { background-color: dark-light-diff($highlight, $secondary, 50%, -55%); }
a { padding: 4px 0 3px 2px; }
p {
margin: 0;
overflow: hidden;
2014-06-03 21:59:42 -04:00
}
}
.is-warning {
i.fa-envelope-o {
&:before {
content: "\f0e0";
}
color: $danger;
}
}
.read {
background-color: $secondary;
}
.none {
padding: 5px;
}
.spinner {
width: 20px;
height: 20px;
border-width: 2px;
margin: 0 auto;
}
/* as a big ol' click target, don't let text inside be selected */
@include unselectable;
}
// Search
&#search-dropdown {
.heading {
2014-07-04 02:20:41 -04:00
padding: 5px 0 5px 5px;
.filter {
padding: 0 5px;
}
}
}
input[type='text'] {
2014-10-18 23:07:55 -04:00
width: 518px;
height: 22px;
margin: 5px;
padding: 5px;
}
2014-06-19 14:04:23 -04:00
.search-context {
padding: 0 5px;
2014-12-02 17:10:14 -05:00
label { margin-bottom: 0; }
2014-06-19 14:04:23 -04:00
}
.searching {
position: absolute;
2014-11-05 20:13:51 -05:00
top: 0;
right: 0;
.spinner {
width: 10px;
height: 10px;
border-width: 2px;
margin: 20px 0 0 0;
2014-11-05 20:13:51 -05:00
}
}
// I am ghetto using this to display "Show More".. be warned
.no-results {
2014-06-03 21:56:50 -04:00
padding: 5px;
2014-10-18 23:07:55 -04:00
text-align: center;
}
.filter {
2014-06-03 21:56:50 -04:00
padding: 0;
&:hover {background: transparent;}
}
// Categories
&#user-dropdown {
width: 118px;
}
.btn {
padding: 2px 8px;
margin-bottom: 2px;
.fa {
margin-right: 5px;
}
}
}
.search-link {
.badge-category-parent {
line-height: 0.8em;
}
.topic-title {
margin-right: 6px;
}
.topic-statuses {
float: none;
display: inline-block;
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
margin: 0;
.fa {
margin: 0;
}
}
}
.highlight-strong {
2015-08-21 15:44:26 -04:00
background-color: dark-light-diff($highlight, $secondary, 40%, -45%);
}
.search-highlight {
font-weight: bold;
}
.search-context .show-help {
position: absolute;
right: 10px;
top: 0;
}
.search-context {
min-height: 30px;
position: relative;
}
2014-10-26 18:16:51 -04:00
.d-dropdown#search-dropdown {
max-height: none;
overflow: inherit;
}
#search-dropdown .results {
max-height: 300px;
overflow: auto;
}
2014-10-18 03:12:48 -04:00
#search-help table td {
padding-right: 10px;
}
2014-11-10 05:31:15 -05:00
// we don't need this X to clear field
#search-term::-ms-clear {
display: none;
}