You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

364 lines
9.0 KiB

  1. /**
  2. * This file provides less mixins for all other style modules
  3. */
  4. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  5. /* Fonts */
  6. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  7. .setLocalFontFace(@fontFamily,@fontWeight,@localFontName,@localFontNameVar,@filename) {
  8. @font-face {
  9. font-family: @fontFamily;
  10. font-style: normal;
  11. font-weight: @fontWeight;
  12. src: ~"local('@{localFontName}'), local('@{localFontNameVar}'), url(fonts/@{filename}.eot)";
  13. src: ~"url(fonts/@{filename}.eot?#iefix) format('embedded-opentype'), url(fonts/@{filename}.woff) format('woff')";
  14. }
  15. }
  16. .setIconFontFace(@fontFamily,@filename) {
  17. @font-face {
  18. font-family: @fontFamily;
  19. src: ~"url('fonts/icons/@{filename}.eot?6762325')";
  20. 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')";
  21. font-weight: normal;
  22. font-style: normal;
  23. }
  24. }
  25. .fontello() {
  26. &::before {
  27. font-family: "fontello";
  28. font-style: normal;
  29. font-weight: normal;
  30. speak: none;
  31. display: inline-block;
  32. text-decoration: inherit;
  33. width: 1em;
  34. margin-right: .2em;
  35. text-align: center;
  36. /* For safety - reset parent styles, that can break glyph codes*/
  37. font-variant: normal;
  38. text-transform: none;
  39. /* fix buttons height, for twitter bootstrap */
  40. line-height: 1em;
  41. /* Animation center compensation - margins should be symmetric */
  42. /* remove if not needed */
  43. margin-left: .2em;
  44. /* you can be more comfortable with increased icons size */
  45. /* font-size: 120%; */
  46. /* Font smoothing. That was taken from TWBS */
  47. -webkit-font-smoothing: antialiased;
  48. -moz-osx-font-smoothing: grayscale;
  49. /* Uncomment for 3D effect */
  50. /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
  51. }
  52. }
  53. .fontello-double() {
  54. &::before,
  55. &::after {
  56. font-family: "fontello";
  57. font-style: normal;
  58. font-weight: normal;
  59. speak: none;
  60. display: inline-block;
  61. text-decoration: inherit;
  62. width: 1em;
  63. margin-right: .2em;
  64. text-align: center;
  65. /* For safety - reset parent styles, that can break glyph codes*/
  66. font-variant: normal;
  67. text-transform: none;
  68. /* fix buttons height, for twitter bootstrap */
  69. line-height: 1em;
  70. /* Animation center compensation - margins should be symmetric */
  71. /* remove if not needed */
  72. margin-left: .2em;
  73. /* you can be more comfortable with increased icons size */
  74. /* font-size: 120%; */
  75. /* Font smoothing. That was taken from TWBS */
  76. -webkit-font-smoothing: antialiased;
  77. -moz-osx-font-smoothing: grayscale;
  78. /* Uncomment for 3D effect */
  79. /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
  80. }
  81. }
  82. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  83. /* Screenreader / Hide */
  84. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  85. .sr-out() {
  86. display: block;
  87. width: 1px;
  88. height: 1px;
  89. overflow: hidden;
  90. position: absolute;
  91. top: -200000em;
  92. left: -200000em;
  93. }
  94. .sr-only() {
  95. position: absolute;
  96. width: 1px;
  97. height: 1px;
  98. margin: -1px;
  99. padding: 0;
  100. overflow: hidden;
  101. clip: rect(0,0,0,0);
  102. border: 0;
  103. }
  104. .sr-only-focusable() {
  105. &:active,
  106. &:focus {
  107. position: static;
  108. width: auto;
  109. height: auto;
  110. margin: 0;
  111. overflow: visible;
  112. clip: auto;
  113. }
  114. }
  115. /* + + + + + small icon-buttons (breadcrumb, page-header) + + + + + */
  116. .btn-hover {
  117. background-color: @ini_nav_menu_hover_bg;
  118. color: @ini_nav_menu_hover_color;
  119. transition: @transition color, @transition background-color, @transition border-color;
  120. &:hover,
  121. &:active,
  122. &:focus {
  123. background-color: @ini_nav_menu_hover_color;
  124. border-color: @ini_nav_menu_hover_color;
  125. color: @ini_nav_menu_hover_bg;
  126. .prefix {
  127. color: inherit;
  128. }
  129. }
  130. }
  131. .btn-usertools-wrapper(@elem:@toggle-size) {
  132. display: inline-block;
  133. min-height: @elem;
  134. min-width: @elem;
  135. box-sizing: border-box;
  136. color: @ini_text_webframe;
  137. font-size: @font-size-small;
  138. padding: 0;
  139. margin: 0 .25rem;
  140. * {
  141. font-size: @font-size-small;
  142. }
  143. }
  144. .btn-usertools-num() {
  145. .num {
  146. position: absolute;
  147. right: -.4rem;
  148. top: -.5em;
  149. background-color: @ini_nav_menu_hover_color;
  150. border-radius: 2px;
  151. color: @ini_nav_menu_hover_bg;
  152. font-size: @font-size-very-small;
  153. font-weight: 400;
  154. text-align: center;
  155. line-height: 1;
  156. padding: .1em @very-small-spacing;
  157. transition: @transition color, @transition background-color;
  158. }
  159. }
  160. .btn-prefix(@margin-top:.3rem) {
  161. .fontello();
  162. .hide-text-show-before();
  163. color: inherit;
  164. font-size: @font-size-default;
  165. @media @screen_min-xxlg {
  166. margin-top: .22rem;
  167. }
  168. @media @screen_max-xxlg {
  169. margin-top: @margin-top;
  170. }
  171. @media @screen_max-md {
  172. margin-top: .2rem;
  173. }
  174. }
  175. .hide-text-show-before() {
  176. display: inline-block;
  177. overflow: hidden;
  178. white-space: nowrap;
  179. text-indent: -9999px;
  180. &::before {
  181. float: left;
  182. width: 100%;
  183. text-indent: 0;
  184. margin: 0;
  185. }
  186. &::after {
  187. float: left;
  188. text-indent: 0;
  189. }
  190. }
  191. .hide-text-show-after() {
  192. display: inline-block;
  193. overflow: hidden;
  194. white-space: nowrap;
  195. text-indent: -9999px;
  196. &::before {
  197. float: right;
  198. text-indent: 0;
  199. }
  200. &::after {
  201. float: right;
  202. text-indent: 0;
  203. }
  204. }
  205. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  206. /* flex-box */
  207. .display-flex() {
  208. display: flex;
  209. display: -ms-flexbox;
  210. display: -webkit-flex;
  211. }
  212. .flex-direction(@elem:column) {
  213. flex-direction: @elem;
  214. -ms-flex-direction: @elem;
  215. -webkit-flex-direction: @elem;
  216. }
  217. .justify-content(@elem:center) {
  218. justify-content: @elem;
  219. -ms-justify-content: @elem;
  220. -webkit-justify-content: @elem;
  221. }
  222. .align-items(@elem:center) {
  223. align-items: @elem;
  224. -ms-align-items: @elem;
  225. -webkit-align-items: @elem;
  226. }
  227. .flex(@elem:1 0 auto) {
  228. flex: @elem;
  229. -ms-flex: @elem;
  230. -webkit-flex: @elem;
  231. }
  232. .flex-wrap() {
  233. flex-wrap: wrap;
  234. -webkit-flex-wrap: wrap;
  235. -ms-flex-wrap: wrap;
  236. }
  237. /* + + + + + + + + + + + + + + + + + + + + + + + + + + */
  238. /* positioning */
  239. .center-middle() {
  240. position: absolute;
  241. top: 50%;
  242. left: 50%;
  243. transform: translateX(-50%) translateY(-50%);
  244. -ms-transform: translateX(-50%) translateY(-50%);
  245. -webkit-transform: translateX(-50%) translateY(-50%);
  246. }
  247. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  248. /* Screenreader / Hide */
  249. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  250. .reset() {
  251. background: transparent;
  252. border: none 0; outline: 0; vertical-align: baseline;
  253. font-style: normal;
  254. margin: 0; padding: 0;
  255. }
  256. .elementsReset() {
  257. div, span, object, iframe,
  258. h1, h2, h3, h4, h5, h6, p, blockquote,
  259. a, abbr, em,acronym, img, strong,
  260. dl, dt, dd, ol, ul, li,
  261. fieldset, form, label, legend,
  262. table, caption, tbody, tfoot, thead, tr, th, td,
  263. input, select, option, textarea, button {
  264. .reset();
  265. }
  266. }
  267. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  268. /* Col Grid */
  269. /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
  270. .make-grid(@class) {
  271. .float-grid-columns(@class);
  272. .grid-columns(1, @class, width);
  273. .grid-columns(2, @class, width);
  274. .grid-columns(3, @class, width);
  275. .grid-columns(4, @class, width);
  276. .grid-columns(5, @class, width);
  277. .grid-columns(6, @class, width);
  278. .grid-columns(7, @class, width);
  279. .grid-columns(8, @class, width);
  280. .grid-columns(9, @class, width);
  281. .grid-columns(10, @class, width);
  282. .grid-columns(11, @class, width);
  283. .grid-columns(12, @class, width);
  284. }
  285. .float-grid-columns(@class) {
  286. .col-@{class}-1,
  287. .col-@{class}-2,
  288. .col-@{class}-3,
  289. .col-@{class}-4,
  290. .col-@{class}-5,
  291. .col-@{class}-6,
  292. .col-@{class}-7,
  293. .col-@{class}-8,
  294. .col-@{class}-9,
  295. .col-@{class}-10,
  296. .col-@{class}-11,
  297. .col-@{class}-12 {
  298. float: left;
  299. }
  300. }
  301. // todo: no recusion - fix it !!!
  302. .grid-columns(@index, @class, @type) {
  303. .calc-grid-column(@index, @class, @type);
  304. }
  305. .calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
  306. .col-@{class}-@{index} {
  307. width: percentage((@index / @grid-columns));
  308. }
  309. }