daux.io/themes/daux/less/_components.less

352 lines
7.2 KiB
Plaintext
Raw Normal View History

2016-05-23 20:09:15 +02:00
/* ===========================================================================================
Base tags
============================================================================================== */
a {
text-decoration: none;
color: @light;
&.external::after {
content: " " url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPIOE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CYII=);
}
&.broken {
color: red;
}
2016-05-23 20:09:15 +02:00
}
p {
margin: 0 0 1em;
}
hr {
clear: both;
margin: 1em 0;
border: 0;
border-top: 1px solid #ddd;
}
code {
color: @dark;
}
2014-02-16 12:28:06 +01:00
/* ===========================================================================================
Components
2014-02-16 12:28:06 +01:00
============================================================================================== */
2016-05-23 20:09:15 +02:00
.Button {
display: inline-block;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
white-space: nowrap;
border-radius: 4px;
&--small {
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
&--default {
color: #333;
background-color: #fff;
border-color: #ccc;
&.Button--active {
color: #333;
background-color: #e6e6e6;
border-color: #adadad;
}
}
}
.ButtonGroup {
position: relative;
display: inline-block;
2016-05-23 20:09:15 +02:00
vertical-align: middle; // match .Button alignment given font-size hack above
2016-05-23 20:09:15 +02:00
.Button + .Button {
margin-left: -1px;
}
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
> .Button {
position: relative;
float: left;
// Bring the "active" button to the front
&:hover,
&:focus {
z-index: 2;
2014-02-16 12:43:16 +01:00
}
2016-05-23 20:09:15 +02:00
&:active,
&.Button--active {
z-index: 3;
}
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
&:first-child {
margin-left: 0;
2016-05-23 20:09:15 +02:00
&:not(:last-child):not(.dropdown-toggle) {
.border-right-radius(0);
2014-02-16 12:43:16 +01:00
}
}
2016-05-23 20:09:15 +02:00
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
&:last-child:not(:first-child) {
.border-left-radius(0);
}
2014-02-16 12:43:16 +01:00
}
2014-02-16 12:28:06 +01:00
}
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
.Navbar {
height: @navbar-height;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
background-color: @dark;
margin-bottom: 0;
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
&__brand {
float: left;
padding: 15px 20px;
font-size: 18px;
line-height: 20px;
height: @navbar-height;
color: @light;
text-shadow: none;
font-family: @font-family-heading;
font-weight: 700;
2014-02-16 12:43:16 +01:00
}
2014-02-16 12:28:06 +01:00
}
2016-05-23 20:09:15 +02:00
.CodeToggler {
&__text {
font-size: 12px;
line-height: 1.5;
padding: 6px 10px 6px 0;
display: inline-block;
vertical-align: middle;
}
2016-04-08 00:13:06 +02:00
}
2016-05-23 20:09:15 +02:00
// Sidebar navigation
.Nav {
margin: 0;
padding: 0;
&__arrow {
display: inline-block;
position: relative;
width: 16px;
margin-left: -16px;
&::before {
position: absolute;
display: block;
content: "";
margin: -0.25em 0 0 -0.4em;
left: 50%;
top: 50%;
width: 0.5em;
height: 0.5em;
border-right: 0.15em solid @dark;
border-top: 0.15em solid @dark;
transform: rotate(45deg);
transition-duration: 0.3s;
}
}
&__item {
display: block;
2014-02-16 12:43:16 +01:00
a {
2016-05-23 20:09:15 +02:00
display: block;
margin: 0;
padding: 6px 15px 6px 20px;
2016-05-23 20:09:15 +02:00
font-family: @font-family-heading;
font-weight: 400;
2014-02-16 12:43:16 +01:00
color: @dark;
font-size: 15px;
text-shadow: none;
2014-02-16 15:06:21 +01:00
border-color: @lines;
2014-02-16 12:43:16 +01:00
&:hover {
color: @dark;
text-shadow: none;
background-color: @sidebar-hover;
}
}
2016-05-23 20:09:15 +02:00
}
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
.Nav {
display: none;
margin-left: 15px;
.Nav__item {
2014-02-16 12:43:16 +01:00
a {
2016-05-23 20:09:15 +02:00
margin: 0;
margin-left: -15px;
padding: 3px 30px;
font-family: @font-family-text;
color: @text;
opacity: 0.7;
&:hover {
opacity: 1;
}
2014-02-16 12:43:16 +01:00
}
2016-05-23 20:09:15 +02:00
&--active a {
color: @dark;
2014-02-16 12:43:16 +01:00
}
2016-05-23 20:09:15 +02:00
}
}
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
&__item {
&--open,
&--active {
> a {
2016-05-23 20:09:15 +02:00
background-color: @sidebar-hover;
2014-02-16 12:43:16 +01:00
}
}
2016-05-23 20:09:15 +02:00
&--open {
> .Nav {
display: block;
}
2014-02-16 12:43:16 +01:00
2016-05-23 20:09:15 +02:00
> a > .Nav__arrow::before {
margin-left: -0.25em;
transform: rotate(135deg);
2014-02-16 12:43:16 +01:00
}
}
}
2014-02-16 12:28:06 +01:00
}
2016-05-23 20:09:15 +02:00
.Page__header {
margin: 0 0 10px;
padding: 0;
2016-05-23 20:09:15 +02:00
border-bottom: 1px solid #eee;
.clearfix();
2014-02-16 12:43:16 +01:00
h1 {
margin: 0;
padding: 0;
2014-02-16 12:43:16 +01:00
}
2016-05-23 20:09:15 +02:00
&--separator {
height: 0.6em;
}
a {
text-decoration: none;
2014-02-16 12:43:16 +01:00
}
2014-02-16 12:28:06 +01:00
}
2016-05-23 20:09:15 +02:00
.Links {
padding: 0 20px;
2014-02-16 12:28:06 +01:00
a {
2016-05-23 20:09:15 +02:00
font-family: @font-family-heading;
font-weight: 400;
color: @light;
2016-05-23 20:09:15 +02:00
line-height: 2em;
2014-02-16 12:43:16 +01:00
}
}
2016-03-13 21:51:58 +01:00
2016-05-23 20:09:15 +02:00
.Search {
2016-03-13 21:51:58 +01:00
position: relative;
2016-05-23 20:09:15 +02:00
float: right;
margin: 8px 20px;
2016-03-13 21:51:58 +01:00
&__field {
2016-05-23 20:09:15 +02:00
display: block;
width: 100%;
height: 34px;
padding: 6px 30px 6px 0;
color: #555;
background: #fff;
border: 1px solid #ccc;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
&:focus {
border-color: @light;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px 2px rgba(102, 175, 233, 0.6);
}
2016-03-13 21:51:58 +01:00
}
&__icon {
position: absolute;
2016-05-23 20:09:15 +02:00
right: 9px;
top: 9px;
width: 16px;
height: 16px;
2016-03-13 21:51:58 +01:00
}
}
2016-04-12 08:38:52 +02:00
.TableOfContents {
font-size: 16px;
2016-05-23 20:09:15 +02:00
padding-left: 0;
border-left: 6px solid #efefef;
2016-04-12 08:38:52 +02:00
p {
margin-bottom: 0;
2016-04-12 08:38:52 +02:00
}
2016-05-23 20:09:15 +02:00
a {
text-decoration: none;
}
2016-04-12 08:38:52 +02:00
.TableOfContents {
border-left-width: 0;
2016-05-23 20:09:15 +02:00
}
}
.Pager {
padding-left: 0;
margin: 1em 0;
list-style: none;
text-align: center;
clear: both;
.clearfix();
li {
display: inline;
> a {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 15px;
}
> a:hover,
> a:focus {
text-decoration: none;
background-color: #eee;
}
}
&--next > a {
float: right;
}
&--prev > a {
float: left;
2016-04-12 08:38:52 +02:00
}
}