example.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. @import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300); // Open Sans font
  2. @import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700); // Condensed
  3. @mixin retina-background($url, $type:png) {
  4. background-image: url("#{$url}.#{$type}");
  5. background-image: -webkit-image-set(url("#{$url}.#{$type}") 1x,
  6. url("#{$url}@2x.#{$type}") 2x);
  7. }
  8. body {
  9. background-color: #f2f4f6;
  10. font-family: 'Open Sans', sans-serif;
  11. text-align: center;
  12. }
  13. h1 {
  14. @include retina-background("images/logo_big");
  15. width: 385px;
  16. height: 81px;
  17. text-indent: -9999px;
  18. white-space: nowrap;
  19. margin: 50px auto;
  20. @media all and (max-width: 420px) {
  21. width: 300px;
  22. background-size: contain;
  23. background-repeat: no-repeat;
  24. background-position: center;
  25. }
  26. @media all and (max-width: 330px) {
  27. width: 250px;
  28. }
  29. }
  30. h2 {
  31. font-size: 20px;
  32. color: #A9B2BC;
  33. line-height: 25px;
  34. text-transform: uppercase;
  35. font-weight: 300;
  36. text-align: center;
  37. display: block;
  38. }
  39. h3 {
  40. font-size: 28px;
  41. color: #C7CCD1;
  42. text-transform: uppercase;
  43. font-family: 'Open Sans Condensed', sans-serif;
  44. margin-top: 100px;
  45. text-align: center;
  46. position: relative;
  47. &#download-section {
  48. margin-top: 50px;
  49. padding-top: 40px;
  50. }
  51. &::after {
  52. content: "";
  53. background-color: #e2e5e8;
  54. height: 4px;
  55. width: 700px;
  56. left: 50%;
  57. margin-left: -350px;
  58. position: absolute;
  59. margin-top: -50px;
  60. border-radius: 2px;
  61. @media all and (max-width: 740px) {
  62. width: auto;
  63. left: 20px;
  64. right: 20px;
  65. margin-left: 0;
  66. }
  67. }
  68. }
  69. a {
  70. text-decoration: none;
  71. }
  72. p {
  73. max-width: 826px;
  74. margin: 30px auto;
  75. font-size: 17px;
  76. font-weight: 300;
  77. color: #848D94;
  78. line-height: 25px;
  79. text-align: left;
  80. &.center {
  81. text-align: center;
  82. }
  83. strong {
  84. color: #8A8F94;
  85. font-weight: 600;
  86. }
  87. a {
  88. color: #9ECADF;
  89. font-weight: 600;
  90. &:hover {
  91. text-decoration: underline;
  92. }
  93. &.twitter {
  94. color: #5eaade;
  95. }
  96. &.dribbble {
  97. color: #f26798;
  98. }
  99. &.github {
  100. color: #323131;
  101. }
  102. }
  103. }
  104. button, .button {
  105. $btnBlue: #AEDEF4;
  106. $btnGray: #D0D0D0;
  107. background-color: $btnBlue;
  108. color: white;
  109. border: none;
  110. box-shadow: none;
  111. font-size: 17px;
  112. font-weight: 500;
  113. font-weight: 600;
  114. border-radius: 3px;
  115. padding: 15px 35px;
  116. margin: 26px 5px 0 5px;
  117. cursor: pointer;
  118. &:focus {
  119. outline: none;
  120. }
  121. &:hover {
  122. background-color: darken($btnBlue, 3%);
  123. }
  124. &:active {
  125. background-color: darken($btnBlue, 10%);
  126. }
  127. &.cancel {
  128. background-color: $btnGray;
  129. &:hover {
  130. background-color: darken($btnGray, 3%);
  131. }
  132. &:active {
  133. background-color: darken($btnGray, 10%);
  134. }
  135. }
  136. &.download {
  137. position: fixed;
  138. right: 30px;
  139. top: 0;
  140. background-color: rgba(white, 0.9);
  141. color: #ABCADA;
  142. font-weight: 500;
  143. text-transform: uppercase;
  144. z-index: 3;
  145. @media all and (max-width: 1278px) {
  146. display: none;
  147. }
  148. }
  149. }
  150. .center-container {
  151. max-width: 700px;
  152. margin: 70px auto;
  153. }
  154. pre {
  155. background-color: #49483e;
  156. color: #f8f8f2;
  157. padding: 10px;
  158. border-radius: 5px;
  159. white-space: pre-line;
  160. text-align: left;
  161. font-size: 14px;
  162. max-width: 600px;
  163. .str {
  164. color: #e6db74;
  165. }
  166. .func {
  167. color: #66d9ef;
  168. }
  169. .val {
  170. color: #a381ff;
  171. }
  172. .tag {
  173. color: #e92772;
  174. }
  175. .attr {
  176. color: #a6e22d;
  177. }
  178. .arg {
  179. color: #fd9720;
  180. }
  181. }
  182. .showcase {
  183. background-color: #eceef0;
  184. padding: 20px;
  185. display: inline-block;
  186. width: 383px;
  187. vertical-align: top;
  188. position: relative;
  189. @media all and (max-width: 865px) {
  190. margin: 5px auto;
  191. padding: 46px 20px;
  192. }
  193. @media all and (max-width: 440px) {
  194. width: auto;
  195. }
  196. h4 {
  197. font-size: 16px;
  198. color: #BCBCBC;
  199. line-height: 22px;
  200. margin: 0 auto;
  201. font-weight: 400;
  202. }
  203. &.sweet h4 {
  204. width: 117px;
  205. height: 25px;
  206. margin-top: -3px;
  207. text-indent: -9999px;
  208. @include retina-background("images/logo_small");
  209. }
  210. h5 {
  211. margin-bottom: -7px;
  212. text-align: left;
  213. font-weight: 500;
  214. text-transform: uppercase;
  215. color: rgb(194, 194, 194);
  216. }
  217. button {
  218. margin-bottom: 10px;
  219. }
  220. .vs-icon {
  221. @include retina-background("images/vs_icon");
  222. width: 69px;
  223. height: 69px;
  224. position: absolute;
  225. right: -34px;
  226. top: 60px;
  227. z-index: 2;
  228. @media all and (max-width: 865px) {
  229. margin: 5px auto;
  230. right: auto;
  231. left: 50%;
  232. margin-left: -35px;
  233. top: auto;
  234. bottom: -35px;
  235. }
  236. }
  237. }
  238. ul.examples {
  239. list-style-type: none;
  240. width: 700px;
  241. margin: 0 auto;
  242. text-align: left;
  243. padding-left: 0;
  244. @media all and (max-width: 758px) {
  245. width: auto;
  246. }
  247. li {
  248. padding-left: 0;
  249. }
  250. .ui, pre {
  251. display: inline-block;
  252. vertical-align: top;
  253. @media all and (max-width: 758px) {
  254. display: block;
  255. max-width: none;
  256. margin: 0 auto;
  257. }
  258. }
  259. .ui {
  260. width: 300px;
  261. text-align: center;
  262. button {
  263. margin-top: 12px;
  264. }
  265. p {
  266. text-align: center;
  267. margin-bottom: 0;
  268. }
  269. }
  270. pre {
  271. max-width: 370px;
  272. margin-top: 67px;
  273. @media all and (max-width: 758px) {
  274. margin-top: 16px !important;
  275. margin-bottom: 60px;
  276. }
  277. }
  278. .warning pre {
  279. margin-top: 93px;
  280. }
  281. }
  282. ol {
  283. max-width: 700px;
  284. margin: 70px auto;
  285. list-style-position: inside;
  286. padding-left: 0;
  287. li {
  288. color: #A7ADB2;
  289. p {
  290. margin-bottom: 10px;
  291. }
  292. }
  293. }
  294. table {
  295. width: 700px;
  296. font-size: 14px;
  297. color: #8a8f94;
  298. margin: 10px auto;
  299. text-align: left;
  300. border-collapse: collapse;
  301. @media all and (max-width: 750px) {
  302. width: auto;
  303. margin: 10px 20px;
  304. }
  305. th {
  306. background-color: white;
  307. padding: 9px;
  308. color: rgb(172, 185, 190);
  309. font-weight: 400;
  310. text-align: center;
  311. position: relative;
  312. .border-left, .border-right {
  313. position: absolute;
  314. background-color: white;
  315. border-radius: 50%;
  316. top: 0;
  317. left: -17px;
  318. width: 37px;
  319. height: 37px;
  320. }
  321. .border-right {
  322. left: auto;
  323. right: -17px;
  324. }
  325. @media all and (max-width: 750px) {
  326. &:nth-child(2) {
  327. display: none;
  328. }
  329. }
  330. }
  331. td {
  332. padding: 10px 20px;
  333. vertical-align: top;
  334. &:first-child {
  335. padding-left: 0px;
  336. }
  337. &:last-child {
  338. padding-right: 0px;
  339. }
  340. @media all and (max-width: 750px) {
  341. &:nth-child(2) {
  342. display: none;
  343. }
  344. }
  345. @media all and (max-width: 360px) {
  346. padding: 10px 4px;
  347. b {
  348. font-size: 13px;
  349. }
  350. }
  351. }
  352. }
  353. footer {
  354. margin-top: 100px;
  355. padding-bottom: 30px;
  356. color: #9A999F;
  357. display: inline-block;
  358. position: relative;
  359. color: gray;
  360. font-weight: 400;
  361. color: rgb(147, 161, 170);
  362. font-weight: 300;
  363. .te-logo {
  364. text-indent: -99999px;
  365. background-size: contain;
  366. background-repeat: no-repeat;
  367. background-position: center center;
  368. height: 16px;
  369. width: 16px;
  370. display: inline-block;
  371. margin-right: 5px;
  372. background-image: url("images/te-logo-small.svg");
  373. position: absolute;
  374. left: -22px;
  375. top: 3px;
  376. }
  377. }
  378. // Theme example (Twitter)
  379. // Twitter Theme for SweetAlert
  380. // By Tristan Edwards
  381. .sweet-alert.twitter {
  382. $header-height: 40px;
  383. $footer-height: 66px;
  384. $text-color: #66757f;
  385. $padding: 15px;
  386. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  387. padding: $padding;
  388. padding-top: $header-height + $padding;
  389. text-align: right; // Align buttons
  390. border-radius: 6px;
  391. box-shadow: 0px 0px 0px 1px rgba(black, 0.11), 0px 6px 30px rgba(black, 0.14);
  392. ~ .sweet-overlay {
  393. background: rgba(41,47,51,0.9);
  394. }
  395. h2 {
  396. position: absolute;
  397. top: 0;
  398. left: 0;
  399. right: 0;
  400. height: $header-height;
  401. line-height: $header-height;
  402. font-size: 16px;
  403. font-weight: 400;
  404. color: #8899a6;
  405. margin: 0;
  406. color: $text-color;
  407. border-bottom: 1px solid #e1e8ed;
  408. }
  409. p {
  410. display: block;
  411. text-align: center;
  412. color: #66757f;
  413. font-weight: 400;
  414. font-size: 13px;
  415. margin-top: 7px;
  416. }
  417. .sa-button-container {
  418. background-color: #f5f8fa;
  419. border-top: 1px solid #e1e8ed;
  420. box-shadow: 0px -1px 0px white;
  421. margin: -$padding;
  422. margin-top: 0;
  423. }
  424. &[data-has-confirm-button=false][data-has-cancel-button=false] {
  425. padding-bottom: 10px;
  426. .sa-button-container {
  427. display: none;
  428. }
  429. }
  430. button {
  431. border-radius: 2px;
  432. box-shadow: none !important;
  433. text-shadow: 0px -1px 0px rgba(black, 0.3);
  434. margin: 17px 0px;
  435. border-radius: 4px;
  436. font-size: 14px;
  437. font-weight: 600;
  438. padding: 8px 16px;
  439. position: relative;
  440. &:focus, &.cancel:focus {
  441. box-shadow: none !important;
  442. &::before {
  443. content: "";
  444. position: absolute;
  445. left: -5px;
  446. top: -5px;
  447. right: -5px;
  448. bottom: -5px;
  449. border: 2px solid #a5b0b4;
  450. border-radius: 8px;
  451. }
  452. }
  453. &.confirm {
  454. background-color: #55acee !important;
  455. background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.05));
  456. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#0C000000)";
  457. border: 1px solid #3b88c3;
  458. box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  459. margin-right: $padding;
  460. &:hover {
  461. background-color: #55acee;
  462. background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.15));
  463. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000, endColorstr=#26000000)";
  464. border-color: #3b88c3;
  465. }
  466. }
  467. &.cancel {
  468. color: #66757e;
  469. background-color: #f5f8fa;
  470. background-image: linear-gradient(#fff,#f5f8fa);
  471. text-shadow: 0px -1px 0px white;
  472. margin-right: 9px;
  473. border: 1px solid #e1e8ed;
  474. &:hover, &:focus:hover {
  475. background-color: #e1e8ed;
  476. background-image: linear-gradient(#fff,#e1e8ed);
  477. -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";
  478. border-color: #e1e8ed;
  479. }
  480. &:focus {
  481. background: #fff;
  482. border-color: #fff;
  483. }
  484. }
  485. }
  486. .sa-icon {
  487. transform: scale(0.72);
  488. margin-bottom: -2px;
  489. margin-top: -10px;
  490. }
  491. input {
  492. border: 1px solid #e1e8ed;
  493. border-radius: 3px;
  494. padding: 10px 7px;
  495. height: auto;
  496. box-shadow: none;
  497. font-size: 13px;
  498. margin: 10px 0;
  499. &:focus {
  500. border-color: #94A1A6;
  501. box-shadow: inset 0 0 0 1px rgba(77, 99, 107, 0.7);
  502. }
  503. }
  504. fieldset .sa-input-error {
  505. display: none;
  506. }
  507. .sa-error-container {
  508. text-align: center;
  509. border: none;
  510. background-color: #fbedc0;
  511. margin-bottom: 6px;
  512. &.show {
  513. border: 1px solid #f0e1b9;
  514. }
  515. .icon {
  516. display: none;
  517. }
  518. p {
  519. color: #292f33;
  520. font-weight: 600;
  521. margin-top: 0;
  522. }
  523. }
  524. }