nav-main new hover for icons
This commit is contained in:
parent
54bed87c4e
commit
52928b7b4e
3 changed files with 941 additions and 905 deletions
|
@ -1,296 +1,319 @@
|
|||
/**
|
||||
* This file provides less mixins for all other style modules
|
||||
*
|
||||
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
|
||||
*/
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Fonts */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.setLocalFontFace(@fontFamily,@fontWeight,@localFontName,@localFontNameVar,@filename) {
|
||||
@font-face {
|
||||
font-family: @fontFamily;
|
||||
font-style: normal;
|
||||
font-weight: @fontWeight;
|
||||
src: ~"local('@{localFontName}'), local('@{localFontNameVar}'), url(fonts/@{filename}.eot)";
|
||||
src: ~"url(fonts/@{filename}.eot?#iefix) format('embedded-opentype'), url(fonts/@{filename}.woff) format('woff')";
|
||||
}
|
||||
}
|
||||
|
||||
.setIconFontFace(@fontFamily,@filename) {
|
||||
@font-face {
|
||||
font-family: @fontFamily;
|
||||
src: ~"url('fonts/icons/@{filename}.eot?6762325')";
|
||||
src: ~"url('fonts/icons/@{filename}.eot?6762325#iefix') format('embedded-opentype'), url('fonts/icons/@{filename}.woff2?6762325') format('woff2'), url('fonts/icons/@{filename}.woff?6762325') format('woff'), url('fonts/icons/@{filename}.ttf?6762325') format('truetype'), url('fonts/icons/@{filename}.svg?6762325#fontello') format('svg')";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.fontello() {
|
||||
&::before {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
}
|
||||
|
||||
.fontello-double() {
|
||||
&::before,
|
||||
&::after {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Screenreader / Hide */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.sr-out() {
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: -200000em;
|
||||
left: -200000em;
|
||||
}
|
||||
|
||||
.sr-only() {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
clip: rect(0,0,0,0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.sr-only-focusable() {
|
||||
&:active,
|
||||
&:focus {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + small icon-buttons (breadcrumb, page-header) + + + + + */
|
||||
.btn-usertools-wrapper(@elem:2em) {
|
||||
display: inline-block;
|
||||
min-height: @elem;
|
||||
min-width: @elem;
|
||||
box-sizing: border-box;
|
||||
color: @color-nav;
|
||||
font-size: .8rem;
|
||||
padding: 0;
|
||||
margin: 0 .2rem;
|
||||
|
||||
* {
|
||||
font-size: .8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-usertools-num () {
|
||||
.num {
|
||||
position: absolute;
|
||||
right: -.4rem;
|
||||
top: -.4em;
|
||||
background-color: @button_background;
|
||||
border-radius: 2px;
|
||||
color: @button_color;
|
||||
font-size: .6rem;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
padding: .2em .2rem .1em;
|
||||
transition: @transition color, @transition background-color;
|
||||
}
|
||||
|
||||
a {
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
.num {
|
||||
background-color: @button_background;
|
||||
color: @button_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-prefix () {
|
||||
.fontello();
|
||||
.hide-text-show-before();
|
||||
|
||||
color: inherit;
|
||||
font-size: 1rem;
|
||||
margin-top: .2rem;
|
||||
}
|
||||
|
||||
|
||||
.btn-default-size() {
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
min-height: 1.2em;
|
||||
min-width: 1.4em;
|
||||
}
|
||||
|
||||
.btn-default-height() {
|
||||
height: 1rem;
|
||||
min-height: 1.2em;
|
||||
min-width: 1.4em;
|
||||
}
|
||||
|
||||
.hide-text-show-before(){
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-indent: -9999px;
|
||||
.btn-default-size();
|
||||
|
||||
&::before{
|
||||
text-indent: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
&::after{
|
||||
text-indent: 0;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.hide-text-show-after() {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-indent: -9999px;
|
||||
|
||||
&::before{
|
||||
text-indent: 0;
|
||||
float: right;
|
||||
}
|
||||
&::after{
|
||||
text-indent: 0;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Screenreader / Hide */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.reset() {
|
||||
background: transparent;
|
||||
border: none 0; outline: 0; vertical-align: baseline;
|
||||
font-style: normal;
|
||||
margin: 0; padding: 0;
|
||||
}
|
||||
|
||||
.elementsReset() {
|
||||
div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote,
|
||||
a, abbr, em,acronym, img, strong,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
input, select, option, textarea, button {
|
||||
.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Col Grid */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.make-grid(@class) {
|
||||
.float-grid-columns(@class);
|
||||
.loop-grid-columns(@grid-columns, @class, width);
|
||||
}
|
||||
|
||||
.float-grid-columns(@class) {
|
||||
.col-@{class}-1, .col-@{class}-2, .col-@{class}-3, .col-@{class}-4, .col-@{class}-5, .col-@{class}-6, .col-@{class}-7, .col-@{class}-8, .col-@{class}-9, .col-@{class}-10, .col-@{class}-11, .col-@{class}-12 {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
|
||||
.calc-grid-column(@index, @class, @type);
|
||||
// next iteration
|
||||
.loop-grid-columns((@index - 1), @class, @type);
|
||||
}
|
||||
|
||||
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
|
||||
.col-@{class}-@{index} {
|
||||
width: percentage((@index / @grid-columns));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* This file provides less mixins for all other style modules
|
||||
*
|
||||
* @author Jana Deutschlaender <deutschlaender@cosmocode.de>
|
||||
*/
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Fonts */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.setLocalFontFace(@fontFamily,@fontWeight,@localFontName,@localFontNameVar,@filename) {
|
||||
@font-face {
|
||||
font-family: @fontFamily;
|
||||
font-style: normal;
|
||||
font-weight: @fontWeight;
|
||||
src: ~"local('@{localFontName}'), local('@{localFontNameVar}'), url(fonts/@{filename}.eot)";
|
||||
src: ~"url(fonts/@{filename}.eot?#iefix) format('embedded-opentype'), url(fonts/@{filename}.woff) format('woff')";
|
||||
}
|
||||
}
|
||||
|
||||
.setIconFontFace(@fontFamily,@filename) {
|
||||
@font-face {
|
||||
font-family: @fontFamily;
|
||||
src: ~"url('fonts/icons/@{filename}.eot?6762325')";
|
||||
src: ~"url('fonts/icons/@{filename}.eot?6762325#iefix') format('embedded-opentype'), url('fonts/icons/@{filename}.woff2?6762325') format('woff2'), url('fonts/icons/@{filename}.woff?6762325') format('woff'), url('fonts/icons/@{filename}.ttf?6762325') format('truetype'), url('fonts/icons/@{filename}.svg?6762325#fontello') format('svg')";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.fontello() {
|
||||
&::before {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
}
|
||||
|
||||
.fontello-double() {
|
||||
&::before,
|
||||
&::after {
|
||||
font-family: "fontello";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* Animation center compensation - margins should be symmetric */
|
||||
/* remove if not needed */
|
||||
margin-left: .2em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Screenreader / Hide */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.sr-out() {
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: -200000em;
|
||||
left: -200000em;
|
||||
}
|
||||
|
||||
.sr-only() {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
clip: rect(0,0,0,0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.sr-only-focusable() {
|
||||
&:active,
|
||||
&:focus {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + small icon-buttons (breadcrumb, page-header) + + + + + */
|
||||
.btn-usertools-wrapper(@elem:2em) {
|
||||
display: inline-block;
|
||||
min-height: @elem;
|
||||
min-width: @elem;
|
||||
box-sizing: border-box;
|
||||
color: @color-nav;
|
||||
font-size: .8rem;
|
||||
padding: 0;
|
||||
margin: 0 .2rem;
|
||||
|
||||
* {
|
||||
font-size: .8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-usertools-num () {
|
||||
.num {
|
||||
position: absolute;
|
||||
right: -.4rem;
|
||||
top: -.4em;
|
||||
background-color: @button_background;
|
||||
border-radius: 2px;
|
||||
color: @button_color;
|
||||
font-size: .6rem;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
padding: .2em .2rem .1em;
|
||||
transition: @transition color, @transition background-color;
|
||||
}
|
||||
|
||||
a {
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
.num {
|
||||
background-color: @button_background;
|
||||
color: @button_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-prefix () {
|
||||
.fontello();
|
||||
.hide-text-show-before();
|
||||
|
||||
color: inherit;
|
||||
font-size: 1rem;
|
||||
margin-top: .2rem;
|
||||
}
|
||||
|
||||
|
||||
.btn-default-size() {
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
min-height: 1.2em;
|
||||
min-width: 1.4em;
|
||||
}
|
||||
|
||||
.btn-default-height() {
|
||||
height: 1rem;
|
||||
min-height: 1.2em;
|
||||
min-width: 1.4em;
|
||||
}
|
||||
|
||||
.hide-text-show-before(){
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-indent: -9999px;
|
||||
.btn-default-size();
|
||||
|
||||
&::before{
|
||||
text-indent: 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
&::after{
|
||||
text-indent: 0;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.hide-text-show-after() {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-indent: -9999px;
|
||||
|
||||
&::before{
|
||||
text-indent: 0;
|
||||
float: right;
|
||||
}
|
||||
&::after{
|
||||
text-indent: 0;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* flex-box */
|
||||
|
||||
.display-flex() {
|
||||
display: flex;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
}
|
||||
|
||||
.flex-direction(@elem:column) {
|
||||
flex-direction: @elem;
|
||||
-ms-flex-direction: @elem;
|
||||
-webkit-flex-direction: @elem;
|
||||
}
|
||||
|
||||
// default "center"
|
||||
.justify-content(@elem:center) {
|
||||
justify-content: @elem;
|
||||
-ms-justify-content: @elem;
|
||||
-webkit-justify-content: @elem;
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Screenreader / Hide */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.reset() {
|
||||
background: transparent;
|
||||
border: none 0; outline: 0; vertical-align: baseline;
|
||||
font-style: normal;
|
||||
margin: 0; padding: 0;
|
||||
}
|
||||
|
||||
.elementsReset() {
|
||||
div, span, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote,
|
||||
a, abbr, em,acronym, img, strong,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
input, select, option, textarea, button {
|
||||
.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
/* Col Grid */
|
||||
/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
|
||||
|
||||
.make-grid(@class) {
|
||||
.float-grid-columns(@class);
|
||||
.loop-grid-columns(@grid-columns, @class, width);
|
||||
}
|
||||
|
||||
.float-grid-columns(@class) {
|
||||
.col-@{class}-1, .col-@{class}-2, .col-@{class}-3, .col-@{class}-4, .col-@{class}-5, .col-@{class}-6, .col-@{class}-7, .col-@{class}-8, .col-@{class}-9, .col-@{class}-10, .col-@{class}-11, .col-@{class}-12 {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
|
||||
.calc-grid-column(@index, @class, @type);
|
||||
// next iteration
|
||||
.loop-grid-columns((@index - 1), @class, @type);
|
||||
}
|
||||
|
||||
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
|
||||
.col-@{class}-@{index} {
|
||||
width: percentage((@index / @grid-columns));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue