_bootswatch.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. // Paper 3.3.4
  2. // Bootswatch
  3. // -----------------------------------------------------
  4. @import url("//fonts.googleapis.com/css?family=Roboto:300,400,500,700");
  5. // Navbar =====================================================================
  6. .navbar {
  7. border: none;
  8. @include box-shadow(0 1px 2px rgba(0,0,0,.3));
  9. &-brand {
  10. font-size: 24px;
  11. }
  12. &-inverse {
  13. .form-control {
  14. color: #fff;
  15. @include placeholder($navbar-inverse-link-color);
  16. &[type=text] {
  17. @include box-shadow(inset 0 -1px 0 $navbar-inverse-link-color);
  18. &:focus {
  19. @include box-shadow(inset 0 -2px 0 #fff);
  20. }
  21. }
  22. }
  23. }
  24. &-nav > li > .dropdown-menu {
  25. margin-top: 2px;
  26. }
  27. }
  28. // Buttons ====================================================================
  29. @mixin btn($class,$bg){
  30. .btn-#{$class} {
  31. background-size: 200%;
  32. background-position: 50%;
  33. &:hover,
  34. &:active:hover,
  35. &:focus {
  36. background-color: darken($bg, 6%);
  37. }
  38. &:active {
  39. background-color: darken($bg, 6%);
  40. @include gradient-radial(darken($bg, 6%) 10%, $bg 11%);
  41. background-size: 1000%;
  42. @include box-shadow(2px 2px 2px rgba(0,0,0,.3));
  43. }
  44. }
  45. }
  46. @include btn(default,$btn-default-bg);
  47. @include btn(primary,$btn-primary-bg);
  48. @include btn(success,$btn-success-bg);
  49. @include btn(info,$btn-info-bg);
  50. @include btn(warning,$btn-warning-bg);
  51. @include btn(danger,$btn-danger-bg);
  52. .btn {
  53. text-transform: uppercase;
  54. border-right: none;
  55. border-bottom: none;
  56. @include box-shadow(1px 1px 2px rgba(0,0,0,.3));
  57. @include transition(all 0.2s);
  58. &-link {
  59. @include box-shadow(none);
  60. &:hover,
  61. &:focus {
  62. color: $brand-primary;
  63. text-decoration: none;
  64. }
  65. }
  66. &-default.disabled {
  67. border: 1px solid $btn-default-border;
  68. }
  69. }
  70. .btn-group {
  71. .btn + .btn,
  72. .btn + .btn-group,
  73. .btn-group + .btn,
  74. .btn-group + .btn-group {
  75. margin-left: 0;
  76. }
  77. &-vertical {
  78. > .btn + .btn,
  79. > .btn + .btn-group,
  80. > .btn-group + .btn,
  81. > .btn-group + .btn-group {
  82. margin-top: 0;
  83. }
  84. }
  85. }
  86. // Typography =================================================================
  87. body {
  88. -webkit-font-smoothing: antialiased;
  89. letter-spacing: .1px;
  90. text-rendering: optimizeLegibility;
  91. }
  92. p {
  93. margin: 0 0 1em;
  94. }
  95. input,
  96. button {
  97. -webkit-font-smoothing: antialiased;
  98. letter-spacing: .1px;
  99. text-rendering: optimizeLegibility;
  100. }
  101. a {
  102. @include transition(all 0.2s);
  103. }
  104. // Tables =====================================================================
  105. // Forms ======================================================================
  106. label {
  107. font-weight: normal;
  108. }
  109. textarea,
  110. textarea.form-control,
  111. input.form-control,
  112. input[type=text],
  113. input[type=password],
  114. input[type=email],
  115. input[type=number],
  116. [type=text].form-control,
  117. [type=password].form-control,
  118. [type=email].form-control,
  119. [type=tel].form-control,
  120. [contenteditable].form-control {
  121. padding: 0;
  122. border: none;
  123. border-radius: 0;
  124. -webkit-appearance: none;
  125. @include box-shadow(inset 0 -1px 0 #ddd);
  126. font-size: 16px;
  127. &:focus {
  128. @include box-shadow(inset 0 -2px 0 $brand-primary);
  129. }
  130. &[disabled],
  131. &[readonly] {
  132. @include box-shadow(none);
  133. border-bottom: 1px dotted #ddd;
  134. }
  135. &.input {
  136. &-sm {
  137. font-size: $font-size-small;
  138. }
  139. &-lg {
  140. font-size: $font-size-large;
  141. }
  142. }
  143. }
  144. select,
  145. select.form-control {
  146. border: 0;
  147. border-radius: 0;
  148. -webkit-appearance: none;
  149. -moz-appearance: none;
  150. appearance: none;
  151. padding-left: 0;
  152. padding-right: 0\9; // remove padding for < ie9 since default arrow can't be removed
  153. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEVmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmaP/QSjAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
  154. background-size: 13px;
  155. background-repeat: no-repeat;
  156. background-position: right center;
  157. @include box-shadow(inset 0 -1px 0 #ddd);
  158. font-size: 16px;
  159. line-height: 1.5;
  160. &::-ms-expand {
  161. display: none;
  162. }
  163. &.input {
  164. &-sm {
  165. font-size: $font-size-small;
  166. }
  167. &-lg {
  168. font-size: $font-size-large;
  169. }
  170. }
  171. &:focus {
  172. @include box-shadow(inset 0 -2px 0 $brand-primary);
  173. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEUhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISF8S9ewAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
  174. }
  175. &[multiple] {
  176. background: none;
  177. }
  178. }
  179. .radio,
  180. .radio-inline,
  181. .checkbox,
  182. .checkbox-inline {
  183. label {
  184. padding-left: 25px;
  185. }
  186. input[type="radio"],
  187. input[type="checkbox"] {
  188. margin-left: -25px;
  189. }
  190. }
  191. input[type="radio"],
  192. .radio input[type="radio"],
  193. .radio-inline input[type="radio"] {
  194. position: relative;
  195. margin-top: 5px;
  196. margin-right: 4px;
  197. vertical-align: -4px;
  198. border: none;
  199. background-color: transparent;
  200. -webkit-appearance: none;
  201. appearance: none;
  202. cursor: pointer;
  203. &:focus {
  204. outline: none;
  205. }
  206. &:before,
  207. &:after {
  208. content: "";
  209. display: block;
  210. width: 18px;
  211. height: 18px;
  212. margin-top: -3px;
  213. border-radius: 50%;
  214. @include transition(240ms);
  215. }
  216. &:before {
  217. position: absolute;
  218. left: 0;
  219. top: 0;
  220. background-color: $brand-primary;
  221. @include scale(0);
  222. }
  223. &:after {
  224. border: 2px solid $gray;
  225. }
  226. &:checked:before {
  227. @include scale(0.5);
  228. }
  229. &:disabled:checked:before {
  230. background-color: $gray-light;
  231. }
  232. &:checked:after {
  233. border-color: $brand-primary;
  234. }
  235. &:disabled:after,
  236. &:disabled:checked:after {
  237. border-color: $gray-light;
  238. }
  239. }
  240. input[type="checkbox"],
  241. .checkbox input[type="checkbox"],
  242. .checkbox-inline input[type="checkbox"] {
  243. position: relative;
  244. vertical-align: -4px;
  245. border: none;
  246. -webkit-appearance: none;
  247. appearance: none;
  248. cursor: pointer;
  249. &:focus {
  250. outline: none;
  251. }
  252. &:after {
  253. content: "";
  254. display: block;
  255. width: 18px;
  256. height: 18px;
  257. margin-top: -2px;
  258. margin-right: 5px;
  259. border: 2px solid $gray;
  260. border-radius: 2px;
  261. @include transition(240ms);
  262. }
  263. &:checked:before {
  264. content: "";
  265. position: absolute;
  266. top: 0;
  267. left: 6px;
  268. display: table;
  269. width: 6px;
  270. height: 12px;
  271. border: 2px solid #fff;
  272. border-top-width: 0;
  273. border-left-width: 0;
  274. @include rotate(45deg);
  275. }
  276. &:checked:after {
  277. background-color: $brand-primary;
  278. border-color: $brand-primary;
  279. }
  280. &:disabled:after {
  281. border-color: $gray-light;
  282. }
  283. &:disabled:checked:after {
  284. background-color: $gray-light;
  285. border-color: transparent;
  286. }
  287. }
  288. .has-warning {
  289. input:not([type=checkbox]),
  290. .form-control,
  291. input:not([type=checkbox]):focus,
  292. .form-control:focus {
  293. @include box-shadow(inset 0 -2px 0 $brand-warning);
  294. }
  295. }
  296. .has-error {
  297. input:not([type=checkbox]),
  298. .form-control,
  299. input:not([type=checkbox]):focus,
  300. .form-control:focus {
  301. @include box-shadow(inset 0 -2px 0 $brand-danger);
  302. }
  303. }
  304. .has-success {
  305. input:not([type=checkbox]),
  306. .form-control,
  307. input:not([type=checkbox]):focus,
  308. .form-control:focus {
  309. @include box-shadow(inset 0 -2px 0 $brand-success);
  310. }
  311. }
  312. // Navs =======================================================================
  313. .nav-tabs {
  314. > li > a,
  315. > li > a:focus {
  316. margin-right: 0;
  317. background-color: transparent;
  318. border: none;
  319. color: $navbar-default-link-color;
  320. @include box-shadow(inset 0 -1px 0 #ddd);
  321. @include transition(all 0.2s);
  322. &:hover {
  323. background-color: transparent;
  324. @include box-shadow(inset 0 -2px 0 $brand-primary);
  325. color: $brand-primary;
  326. }
  327. }
  328. & > li.active > a,
  329. & > li.active > a:focus {
  330. border: none;
  331. @include box-shadow(inset 0 -2px 0 $brand-primary);
  332. color: $brand-primary;
  333. &:hover {
  334. border: none;
  335. color: $brand-primary;
  336. }
  337. }
  338. & > li.disabled > a {
  339. @include box-shadow(inset 0 -1px 0 #ddd);
  340. }
  341. &.nav-justified {
  342. & > li > a,
  343. & > li > a:hover,
  344. & > .active > a,
  345. & > .active > a:hover {
  346. border: none;
  347. }
  348. }
  349. .dropdown-menu {
  350. margin-top: 0;
  351. }
  352. }
  353. .dropdown-menu {
  354. border: none;
  355. @include box-shadow(0 1px 4px rgba(0,0,0,.3));
  356. }
  357. // Indicators =================================================================
  358. .alert {
  359. border: none;
  360. color: #fff;
  361. &-success {
  362. background-color: $brand-success;
  363. }
  364. &-info {
  365. background-color: $brand-info;
  366. }
  367. &-warning {
  368. background-color: $brand-warning;
  369. }
  370. &-danger {
  371. background-color: $brand-danger;
  372. }
  373. a:not(.close),
  374. .alert-link {
  375. color: #fff;
  376. font-weight: bold;
  377. }
  378. .close {
  379. color: #fff;
  380. }
  381. }
  382. .badge {
  383. padding: 3px 6px 5px;
  384. }
  385. .progress {
  386. position: relative;
  387. z-index: 1;
  388. height: 6px;
  389. border-radius: 0;
  390. @include box-shadow(none);
  391. &-bar {
  392. @include box-shadow(none);
  393. &:last-child {
  394. border-radius: 0 3px 3px 0;
  395. }
  396. &:last-child {
  397. &:before {
  398. display: block;
  399. content: "";
  400. position: absolute;
  401. width: 100%;
  402. height: 100%;
  403. left: 0;
  404. right: 0;
  405. z-index: -1;
  406. background-color: lighten($progress-bar-bg, 35%);
  407. }
  408. }
  409. &-success:last-child.progress-bar:before {
  410. background-color: lighten($brand-success, 35%);
  411. }
  412. &-info:last-child.progress-bar:before {
  413. background-color: lighten($brand-info, 45%);
  414. }
  415. &-warning:last-child.progress-bar:before {
  416. background-color: lighten($brand-warning, 35%);
  417. }
  418. &-danger:last-child.progress-bar:before {
  419. background-color: lighten($brand-danger, 25%);
  420. }
  421. }
  422. }
  423. // Progress bars ==============================================================
  424. // Containers =================================================================
  425. .close {
  426. font-size: 34px;
  427. font-weight: 300;
  428. line-height: 24px;
  429. opacity: 0.6;
  430. &:hover {
  431. opacity: 1;
  432. }
  433. }
  434. .list-group {
  435. &-item {
  436. padding: 15px;
  437. }
  438. &-item-text {
  439. color: $gray-light;
  440. }
  441. }
  442. .well {
  443. border-radius: 0;
  444. @include box-shadow(none);
  445. }
  446. .panel {
  447. border: none;
  448. border-radius: 2px;
  449. @include box-shadow(0 1px 4px rgba(0,0,0,.3));
  450. &-heading {
  451. border-bottom: none;
  452. }
  453. &-footer {
  454. border-top: none;
  455. }
  456. &-success {
  457. .panel-heading {
  458. background-color: $brand-success;
  459. }
  460. .panel-title {
  461. color: #fff;
  462. }
  463. }
  464. &-info {
  465. .panel-heading {
  466. background-color: $brand-info;
  467. }
  468. .panel-title {
  469. color: #fff;
  470. }
  471. }
  472. &-warning {
  473. .panel-heading {
  474. background-color: $brand-warning;
  475. }
  476. .panel-title {
  477. color: #fff;
  478. }
  479. }
  480. &-danger {
  481. .panel-heading {
  482. background-color: $brand-danger;
  483. }
  484. .panel-title {
  485. color: #fff;
  486. }
  487. }
  488. }
  489. .popover {
  490. border: none;
  491. @include box-shadow(0 1px 4px rgba(0,0,0,.3));
  492. }
  493. .carousel {
  494. &-caption {
  495. h1, h2, h3, h4, h5, h6 {
  496. color: inherit;
  497. }
  498. }
  499. }