Lungo.theme.default.less 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. /**
  2. * Stylesheet
  3. *
  4. * @namespace Lungo.Theme
  5. * @class Default
  6. *
  7. * @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
  8. */
  9. @import "mixins.less";
  10. @import "constants.less";
  11. @theme: #2A95D3;
  12. @theme-light: #39ABE1;
  13. @theme-dark: #1984C2;
  14. // @theme: #2C8BCA;
  15. // @theme-light: #2C8BCA;
  16. // @theme-dark: #154F93;
  17. @footer: #292F34;
  18. @footer-dark: #23282C;
  19. @color: #484a49;
  20. @section-radius: 4px;
  21. .app {
  22. background: #000;
  23. font-family: "Roboto", Helvetica, Arial, sans-serif;
  24. }
  25. .theme, li.theme, a.theme {
  26. background: @theme;
  27. &:active { background: @theme-dark;}
  28. }
  29. /* @group <header> & <footer> & <article> */
  30. section > header {
  31. .linear-gradient(top, ~','@theme, ~','@theme-dark);
  32. .box-shadow(~"inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(255,255,255,0.1), inset 0 -1px 0 rgba(0,0,0,0.5)");
  33. .border-radius(@section-radius @section-radius 0px 0px);
  34. & .title {
  35. color: #fff;
  36. text-shadow: 0 1px 0 rgba(0,0,0,0.2);
  37. }
  38. & .subtitle {
  39. color: #fff;
  40. opacity: 0.7;
  41. }
  42. }
  43. section > footer {
  44. .linear-gradient(top, ~','@footer 0%, ~','@footer-dark 60%);
  45. .border-radius(0px 0px @section-radius @section-radius);
  46. .box-shadow(~"inset 0 1px 0 rgba(0,0,0,0.8), inset 0 2px 0 rgba(255,255,255,0.05)");
  47. }
  48. section > nav.groupbar {
  49. .linear-gradient(top, ~','@footer-dark 0%, ~','@footer 60%);
  50. }
  51. section > article { background: #f4f5f5; }
  52. /* @end */
  53. /* @group <nav> */
  54. header nav {
  55. & a {
  56. color: #fff;
  57. // &:active { text-shadow: 0 0 4px rgba(255,255,255,0.5); }
  58. }
  59. &.box {
  60. .box-shadow(~"1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.2)");
  61. &.accept { background: rgba(0, 255, 0, 0.4); }
  62. &.cancel { background: rgba(255, 0, 0, 0.4); }
  63. &:active {
  64. color: #fff;
  65. &.accept { background: rgba(0, 255, 0, 0.2); }
  66. &.cancel { background: rgba(255, 0, 0, 0.2); }
  67. &:not(.accept):not(.cancel) { background: rgba(0,0,0,0.1); }
  68. }
  69. &.right a {
  70. .box-shadow(~"-1px 0 0 rgba(255,255,255,0.2), inset 1px 0 0 rgba(0,0,0,0.2)");
  71. }
  72. }
  73. &.button a {
  74. border-radius: @section-radius;
  75. .linear-gradient(top, ~','rgba(0,0,0,0.0), ~','rgba(0,0,0,0.1));
  76. box-shadow: 0 1px 0 rgba(255,255,255,0.2), inset 0 0 3px rgba(0,0,0,0.3), inset 0 1px 1px rgba(0, 0, 0, .5);
  77. &:active { background: rgba(0,0,0,0.2); }
  78. }
  79. }
  80. footer nav a.current {
  81. background: #000;
  82. .box-shadow(~"-1px 0 0 rgba(255,255,255,0.05), 1px 1px 0 rgba(255,255,255,0.05)");
  83. }
  84. footer nav a, nav.groupbar a{
  85. color: rgba(0,0,0,0.7);
  86. .text-shadow(0 1px 0 rgba(255,255,255,0.1));
  87. &.current {
  88. color: #fff;
  89. text-shadow: 0 0 1px #fff;}
  90. }
  91. nav.groupbar a.current { .box-shadow(inset 0 -3px 0 @theme); }
  92. /* @end */
  93. /* @group <aside> */
  94. aside {
  95. color: #fff;
  96. background: @footer;
  97. & header, footer {
  98. .box-shadow(~"inset 0 1px 0 rgba(0,0,0,0.1), inset 0 -1px 0 rgba(255,255,255,0.1)");
  99. background: @footer-dark; }
  100. & article { background: none; }
  101. & nav {
  102. & .icon {color:white;}
  103. }
  104. }
  105. section.aside {
  106. .box-shadow(~"-4px 0 8px rgba(0,0,0,0.5)");
  107. &.right { .box-shadow(~"4px 0 8px rgba(0,0,0,0.5)"); }
  108. }
  109. /*
  110. @media handheld, only screen and (min-width: 768px) {
  111. section.current, section.show {
  112. .box-shadow(~"-4px 0 8px rgba(0,0,0,0.5)");
  113. &.right { .box-shadow(~"4px 0 8px rgba(0,0,0,0.5)"); }
  114. }
  115. }
  116. */
  117. /* @end */
  118. /* @group .list */
  119. @list-border: #ddd;
  120. @list-color: #2a2a2a;
  121. .list {
  122. & li {
  123. background: #fff;
  124. border-bottom: 1px inset @list-border;
  125. &:last-child { border-bottom: none; }
  126. &, & a { color: @list-color; }
  127. &.contrast {
  128. background: @footer;
  129. color: #fff;
  130. }
  131. &.highlight { background: @list-border; }
  132. &.anchor {
  133. background: @footer;
  134. border-bottom: none;
  135. &, & a { color: #fff !important; }
  136. }
  137. &.selectable:active {
  138. background: @theme-light;
  139. &, & a {
  140. color: #fff;
  141. text-shadow: none;
  142. }
  143. }
  144. & small, & .right:not(.bubble) { opacity: 0.8; }
  145. }
  146. }
  147. aside .list {
  148. & li {
  149. background: none;
  150. border-top: 1px solid rgba(255,255,255,0.05);
  151. border-bottom: 1px solid ;
  152. &.current {
  153. border-top-color: @theme;
  154. .linear-gradient(top, ~','@theme-light 25%, ~','@theme-dark 100%);}
  155. & strong, & small, & .icon { color: #fff; }
  156. & strong { text-shadow: 0 1px 1px rgba(0,0,0,0.5); }
  157. }
  158. }
  159. /* @end */
  160. /* @group widgets */
  161. .splash {
  162. background: @footer;
  163. color: #fff;
  164. text-shadow: 0 1px 0px rgba(0,0,0,0.2);
  165. }
  166. &.indented {
  167. & ul {
  168. border: 1px solid @list-border;
  169. box-shadow: 0 0 4px rgba(0,0,0,0.1);
  170. }
  171. & li {
  172. &:first-child { .border-radius(2px 2px 0 0); }
  173. &:last-child {
  174. .border-radius(0 0 2px 2px);
  175. .box-shadow(0 1px 1px rgba(0,0,0,0.05));
  176. }
  177. }
  178. }
  179. /* @group .button */
  180. a.button {
  181. .border-radius(2px);
  182. .box-shadow(~"inset 1px 0 0 rgba(0,0,0,0.3), inset 0 1px 0 rgba(0,0,0,0.3), inset -1px 0 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255, 0.2)");
  183. font-weight: bold;
  184. text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
  185. &:active { .box-shadow(~"inset 0 10px 30px rgba(0,0,0,0.2), inset 0 -2px 4px rgba(0,0,0,0.3)"); }
  186. }
  187. /* @end */
  188. /* @group <form> */
  189. @box-shadow-form: ~'inset 0 1px 2px rgba(0,0,0,0.1)';
  190. @box-shadow-form-active: ~'inset 0 1px 1px rgba(0,0,0,0.1), 3px 0 #f0eeef, 0 3px #f0eeef, -3px 0 #f0eeef, 0 -3px #f0eeef';
  191. @border-radius-form: 2px;
  192. label { color: #999; }
  193. input, textarea, select {
  194. border: 1px solid #ccc;
  195. .border-radius(@border-radius-form);
  196. color: #858585;
  197. font-family: Helvetica, Arial, sans-serif;
  198. .box-shadow(@box-shadow-form);
  199. &:focus {
  200. color: #484a49;
  201. border-color: @theme;
  202. .box-shadow(0 0 6px @theme-light);
  203. }
  204. }
  205. .select:after {
  206. background: #ccc;
  207. color: white;
  208. border-top-right-radius: @border-radius-form;
  209. border-bottom-right-radius: @border-radius-form;
  210. }
  211. /* @group .range */
  212. input[type="checkbox"] + span, input[type="radio"] + span {
  213. color: #fff;
  214. background: #a0a0a0;
  215. .border-radius(@border-radius-form);
  216. }
  217. input[type="checkbox"] + span::before,
  218. input[type="radio"] + span::before {
  219. background: #c1c1c1;
  220. .border-radius(@border-radius-form);
  221. }
  222. input[type="checkbox"]:checked + span,
  223. input[type="radio"]:checked + span {
  224. .linear-gradient(top, ~','@theme 0%, ~','@theme-dark 100%);
  225. .border-radius(@border-radius-form);
  226. }
  227. /* @end */
  228. /* @group range */
  229. input[type="range"] {
  230. background-color: #c7c7c7;
  231. .border-radius(@border-radius-form);
  232. .box-shadow(@box-shadow-form);
  233. &:active { .box-shadow(none); }
  234. &::-webkit-slider-thumb {
  235. .border-radius(12px);
  236. background: #a0a0a0;
  237. }
  238. &:active::-webkit-slider-thumb {
  239. .box-shadow(0px 0px 4px @theme-light);
  240. .linear-gradient(top, ~','@theme 0%, ~','@theme-dark 100%);
  241. }
  242. }
  243. /* @end */
  244. /* @group .progress */
  245. .progress {
  246. .labels {
  247. font-size: 12px;
  248. font-weight: bold;
  249. line-height: 18px;
  250. color: #858585;
  251. }
  252. & .bar {
  253. background: #c7c7c7;
  254. .border-radius(@border-radius-form);
  255. & .value {
  256. .linear-gradient(top, ~','@theme-light 0%, ~','@theme-dark 100%);
  257. .border-radius(@border-radius-form);
  258. & .label {
  259. float: right;
  260. margin-right: 3px;
  261. font-weight: bold;
  262. color: rgba(0,0,0,0.6);
  263. text-shadow: 0 1px 0 rgba(255,255,255,0.2) !important;
  264. font-size: 12px;
  265. }
  266. }
  267. }
  268. }
  269. /* @end */
  270. /* @group .bubble */
  271. .bubble {
  272. color: #fff;
  273. .border-radius(2px);
  274. &.count { .linear-gradient(top, ~','@theme-light 0%, ~','@theme-dark 100%); }
  275. }
  276. footer .bubble {
  277. .box-shadow(~'inset 0 1px 1px rgba(255,255,255,0.3), 0 1px 2px rgba(0,0,0,0.5)'); }
  278. article .list .bubble {
  279. .box-shadow(~'inset 1px 0 0 rgba(0,0,0,0.3), inset 0 1px 0 rgba(0,0,0,0.3), inset -1px 0 0 rgba(0,0,0,0.3), inset 0 -1px 0 rgba(0,0,0,0.3)');
  280. }
  281. aside .list .bubble { background: rgba(0,0,0,0.25); }
  282. /* @end */
  283. /* @group .bubble */
  284. .notification {
  285. color: #fff;
  286. & .window {
  287. &.confirm { background: #333; }
  288. &.notify {
  289. text-shadow: 0 1px 0px rgba(0,0,0,0.1);
  290. .box-shadow(~'inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -1px 0 rgba(0,0,0,0.2), 0px 1px 2px rgba(0,0,0,0.25)');
  291. &.error { background: @red; }
  292. &.alert { background: @yellow; }
  293. &.success { background: @green; }
  294. }
  295. &.url {
  296. & .close {
  297. background: #000;
  298. border: solid 2px #fff;
  299. box-shadow: 0 0 4px black;
  300. }
  301. }
  302. }
  303. }