emojionearea.scss 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. @import "compass/css3";
  2. @import "variables";
  3. @import "image";
  4. @import "text-complete";
  5. .#{$css-prefix}-text {
  6. [class*=emojione-], .emojioneemoji {
  7. font-size: inherit;
  8. height: 2ex;
  9. width: 2.1ex;
  10. min-height: 20px;
  11. min-width: 20px;
  12. display: inline-block;
  13. margin: -.2ex .15em .2ex;
  14. line-height: normal;
  15. vertical-align: middle;
  16. max-width: 100%;
  17. top: 0;
  18. }
  19. }
  20. .#{$css-prefix} {
  21. &, & * {
  22. @include box-sizing(border-box);
  23. }
  24. &, &.form-control {
  25. display: block;
  26. position: relative !important;
  27. width: 100%;
  28. height: auto;
  29. padding: 0;
  30. font-size: $font-size;
  31. border: 0;
  32. background-color: $bg-color;
  33. border: 1px solid $border-color;
  34. @include border-radius($border-radius);
  35. @include box-shadow($box-shadow-inset);
  36. -moz-transition: border-color 0.15s ease-in-out, -moz-box-shadow 0.15s ease-in-out;
  37. -o-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  38. -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
  39. transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  40. }
  41. &.focused {
  42. border-color: $border-color-focused;
  43. outline: 0;
  44. @include box-shadow($box-shadow-inset, $box-shadow-focused);
  45. }
  46. .#{$css-prefix}-editor {
  47. display: block;
  48. height: auto;
  49. min-height: 8em;
  50. max-height: 15em;
  51. overflow: auto;
  52. padding: 6px 24px 6px 12px;
  53. line-height: 1.42857143;
  54. font-size: inherit;
  55. color: $text-color;
  56. background-color: transparent;
  57. border: 0;
  58. cursor: text;
  59. margin-right: 1px;
  60. @include border-radius(0);
  61. @include box-shadow(none);
  62. &:empty:before {
  63. content: attr(placeholder);
  64. display: block;
  65. color: $placeholder-color;
  66. }
  67. &:focus {
  68. border: 0;
  69. outline: 0;
  70. @include box-shadow(none);
  71. }
  72. [class*=emojione-], .emojioneemoji {
  73. font-size: inherit;
  74. height: 2ex;
  75. width: 2.1ex;
  76. min-height: 20px;
  77. min-width: 20px;
  78. display: inline-block;
  79. margin: -.2ex .15em .2ex;
  80. line-height: normal;
  81. vertical-align: middle;
  82. max-width: 100%;
  83. top: 0;
  84. }
  85. }
  86. &.#{$css-prefix}-inline {
  87. height: $inline-height;
  88. > .#{$css-prefix}-editor {
  89. height: $inline-height - 2;
  90. min-height: 20px;
  91. overflow: hidden;
  92. white-space: nowrap;
  93. position: absolute;
  94. top: 0;
  95. left: 12px;
  96. right: 24px;
  97. padding: 6px 0;
  98. }
  99. > .#{$css-prefix}-button {
  100. top: 4px;
  101. }
  102. }
  103. .#{$css-prefix}-button {
  104. z-index: 5;
  105. position: absolute;
  106. right: 3px;
  107. top: 3px;
  108. width: 24px;
  109. height: 24px;
  110. opacity: 0.6;
  111. cursor: pointer;
  112. @include transition(opacity 300ms ease-in-out);
  113. &:hover {
  114. opacity: 1;
  115. }
  116. > div {
  117. display: block;
  118. width: 24px;
  119. height: 24px;
  120. position: absolute;
  121. @include transition(all 400ms ease-in-out);
  122. $_hack: inline-image-store(background, $sprite);
  123. &.#{$css-prefix}-button-open {
  124. background-position: 0 -24px;
  125. @include opacity(1);
  126. }
  127. &.#{$css-prefix}-button-close {
  128. background-position: 0 0;
  129. -webkit-transform: rotate(-45deg);
  130. -o-transform: rotate(-45deg);
  131. transform: rotate(-45deg);
  132. @include opacity(0);
  133. }
  134. }
  135. &.active {
  136. > div {
  137. &.#{$css-prefix}-button-open {
  138. -webkit-transform: rotate(45deg);
  139. -o-transform: rotate(45deg);
  140. transform: rotate(45deg);
  141. @include opacity(0);
  142. }
  143. &.#{$css-prefix}-button-close {
  144. -webkit-transform: rotate(0deg);
  145. -o-transform: rotate(0deg);
  146. transform: rotate(0deg);
  147. @include opacity(1);
  148. }
  149. }
  150. }
  151. }
  152. .#{$css-prefix}-picker {
  153. background: $picker-bg;
  154. position: absolute;
  155. @include box-shadow(0 1px 5px rgba(0, 0, 0, 0.32));
  156. @include border-radius($picker-border-radius);
  157. height: $picker-height;
  158. width: $picker-width;
  159. top: -15px;
  160. right: -15px;
  161. z-index: $z-index;
  162. @include transition(all ease-in-out .25s);
  163. @include opacity(0);
  164. @include user-select(none);
  165. &.hidden {
  166. display: none;
  167. }
  168. .#{$css-prefix}-wrapper {
  169. position: relative;
  170. height: $picker-height;
  171. width: $picker-width;
  172. &:after {
  173. content: "";
  174. display: block;
  175. position: absolute;
  176. $_hack: inline-image-store(background, $sprite);
  177. background-repeat: no-repeat;
  178. z-index: $z-index + 1;
  179. }
  180. }
  181. .#{$css-prefix}-filters, .#{$css-prefix}-search {
  182. width: 100%;
  183. position: absolute;
  184. z-index: $z-index + 5;
  185. }
  186. .#{$css-prefix}-search {
  187. padding: 5px 0 0 10px;
  188. height: $search-height;
  189. }
  190. .#{$css-prefix}-filters {
  191. background: #F5F7F9;
  192. padding: 0 0 0 7px;
  193. height: $filters-height;
  194. .#{$css-prefix}-filter {
  195. display: block;
  196. float: left;
  197. height: $filters-height;
  198. width: 32px;
  199. filter: inherit;
  200. padding: 7px 1px 0;
  201. cursor: pointer;
  202. @include filter(grayscale(1));
  203. &.active {
  204. background: #fff;
  205. }
  206. &.active, &:hover {
  207. @include filter(grayscale(0));
  208. }
  209. > i {
  210. width: 24px;
  211. height: 24px;
  212. top: 0;
  213. }
  214. > img {
  215. width: 24px;
  216. height: 24px;
  217. margin: 0 3px;
  218. }
  219. }
  220. }
  221. .#{$css-prefix}-tones {
  222. position: absolute;
  223. top: $filters-height + 6px;
  224. right: 10px;
  225. height: 22px;
  226. z-index: $z-index + 5;
  227. > .btn-tone {
  228. display: inline-block;
  229. padding: 0;
  230. border: 0;
  231. vertical-align: middle;
  232. outline: none;
  233. background: transparent;
  234. cursor: pointer;
  235. position: relative;
  236. &.btn-tone-0 {
  237. &, &:after {
  238. background-color: #ffcf3e;
  239. }
  240. }
  241. &.btn-tone-1 {
  242. &, &:after {
  243. background-color: #fae3c5;
  244. }
  245. }
  246. &.btn-tone-2 {
  247. &, &:after {
  248. background-color: #e2cfa5;
  249. }
  250. }
  251. &.btn-tone-3 {
  252. &, &:after {
  253. background-color: #daa478;
  254. }
  255. }
  256. &.btn-tone-4 {
  257. &, &:after {
  258. background-color: #a78058;
  259. }
  260. }
  261. &.btn-tone-5 {
  262. &, &:after {
  263. background-color: #5e4d43;
  264. }
  265. }
  266. }
  267. &.#{$css-prefix}-tones-bullet,
  268. &.#{$css-prefix}-tones-square {
  269. > .btn-tone {
  270. width: 20px;
  271. height: 20px;
  272. margin: 0;
  273. background-color: transparent;
  274. &:after {
  275. content: "";
  276. position: absolute;
  277. display: block;
  278. top: 4px;
  279. left: 4px;
  280. width: 12px;
  281. height: 12px;
  282. }
  283. &.active:after {
  284. top: 0;
  285. left: 0;
  286. width: 20px;
  287. height: 20px;
  288. }
  289. }
  290. }
  291. &.#{$css-prefix}-tones-radio,
  292. &.#{$css-prefix}-tones-checkbox{
  293. > .btn-tone {
  294. width: 16px;
  295. height: 16px;
  296. margin: 0px 2px;
  297. &.active {
  298. &:after {
  299. content: "";
  300. position: absolute;
  301. display: block;
  302. background-color: transparent;
  303. border: 2px solid #fff;
  304. width: 8px;
  305. height: 8px;
  306. top: 2px;
  307. left: 2px;
  308. box-sizing: initial;
  309. }
  310. }
  311. }
  312. }
  313. &.#{$css-prefix}-tones-bullet,
  314. &.#{$css-prefix}-tones-radio {
  315. > .btn-tone {
  316. &, &:after {
  317. @include border-radius(100%);
  318. }
  319. }
  320. }
  321. &.#{$css-prefix}-tones-square,
  322. &.#{$css-prefix}-tones-checkbox {
  323. > .btn-tone {
  324. &, &:after {
  325. @include border-radius(1px);
  326. }
  327. }
  328. }
  329. }
  330. .#{$css-prefix}-scroll-area {
  331. height: $picker-height - $filters-height - $search-height;
  332. overflow: auto;
  333. overflow-x: hidden;
  334. width: 100%;
  335. position: absolute;
  336. padding: 0 0 5px;
  337. .#{$css-prefix}-emojis-list {
  338. z-index: 1;
  339. }
  340. h1 {
  341. display: block;
  342. font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  343. font-size: 13px;
  344. font-weight: normal;
  345. color: #b2b2b2;
  346. background: $picker-bg;
  347. line-height: 20px;
  348. margin: 0;
  349. padding: 7px 0 5px 6px;
  350. &:after, &:before {
  351. content: " ";
  352. display: block;
  353. clear: both;
  354. }
  355. }
  356. .#{$css-prefix}-category {
  357. padding: 0 0 0 7px;
  358. &:after, &:before {
  359. content: " ";
  360. display: block;
  361. clear: both;
  362. }
  363. }
  364. [class*=emojione-] {
  365. @include box-sizing(content-box);
  366. margin: 0;
  367. width: 24px;
  368. height: 24px;
  369. top: 0;
  370. }
  371. .emojibtn {
  372. @include box-sizing(content-box);
  373. width: 24px;
  374. height: 24px;
  375. float: left;
  376. display: block;
  377. margin: 1px;
  378. padding: 3px;
  379. &:hover {
  380. @include border-radius(4px);
  381. background-color: #e4e4e4;
  382. cursor: pointer;
  383. }
  384. i, img {
  385. float: left;
  386. display: block;
  387. width: 24px;
  388. height: 24px;
  389. }
  390. img.lazy-emoji {
  391. @include opacity(0);
  392. }
  393. }
  394. }
  395. &.#{$css-prefix}-filters-position-top {
  396. .#{$css-prefix}-filters {
  397. top: 0;
  398. @include border-top-left-radius($picker-border-radius);
  399. @include border-top-right-radius($picker-border-radius);
  400. }
  401. .#{$css-prefix}-search {
  402. top: $filters-height;
  403. }
  404. .#{$css-prefix}-scroll-area {
  405. bottom: 0;
  406. }
  407. }
  408. &.#{$css-prefix}-filters-position-bottom {
  409. .#{$css-prefix}-filters {
  410. bottom: 0;
  411. @include border-bottom-left-radius($picker-border-radius);
  412. @include border-bottom-right-radius($picker-border-radius);
  413. }
  414. .#{$css-prefix}-search {
  415. bottom: $filters-height;
  416. }
  417. .#{$css-prefix}-scroll-area {
  418. top: 0;
  419. }
  420. }
  421. &.#{$css-prefix}-picker-position-top {
  422. margin-top: - $picker-height - 10;
  423. right: -14px;
  424. .#{$css-prefix}-wrapper:after {
  425. width: 19px;
  426. height: 10px;
  427. background-position: -2px -49px;
  428. bottom: -10px;
  429. right: 20px;
  430. }
  431. &.#{$css-prefix}-filters-position-bottom {
  432. .#{$css-prefix}-wrapper:after {
  433. background-position: -2px -80px;
  434. }
  435. }
  436. }
  437. &.#{$css-prefix}-picker-position-left,
  438. &.#{$css-prefix}-picker-position-right {
  439. margin-right: - $picker-width - 10;
  440. top: -8px;
  441. .#{$css-prefix}-wrapper:after {
  442. width: 10px;
  443. height: 19px;
  444. background-position: 0px -60px;
  445. top: 13px;
  446. left: -10px;
  447. }
  448. &.#{$css-prefix}-filters-position-bottom {
  449. .#{$css-prefix}-wrapper:after {
  450. background-position: right -60px;
  451. }
  452. }
  453. }
  454. &.#{$css-prefix}-picker-position-bottom {
  455. margin-top: 10px;
  456. right: -14px;
  457. top: $inline-height - 2 + 15px;
  458. .#{$css-prefix}-wrapper:after {
  459. width: 19px;
  460. height: 10px;
  461. background-position: -2px -100px;
  462. top: -10px;
  463. right: 20px;
  464. }
  465. &.#{$css-prefix}-filters-position-bottom {
  466. .#{$css-prefix}-wrapper:after {
  467. background-position: -2px -90px;
  468. }
  469. }
  470. }
  471. }
  472. .#{$css-prefix}-button.active {
  473. + .#{$css-prefix}-picker {
  474. @include opacity(1);
  475. }
  476. + .#{$css-prefix}-picker-position-top {
  477. margin-top: - $picker-height + 7;
  478. }
  479. + .#{$css-prefix}-picker-position-left,
  480. + .#{$css-prefix}-picker-position-right {
  481. margin-right: - $picker-width + 7;
  482. }
  483. + .#{$css-prefix}-picker-position-bottom {
  484. margin-top: - 7px;
  485. }
  486. }
  487. &.#{$css-prefix}-standalone {
  488. display: inline-block;
  489. width: auto;
  490. box-shadow: none;
  491. .#{$css-prefix}-editor {
  492. min-height: 33px;
  493. position: relative;
  494. padding: 6px 42px 6px 6px;
  495. &::before {
  496. content: "";
  497. position: absolute;
  498. top: 4px;
  499. left: 50%;
  500. bottom: 4px;
  501. border-left: 1px solid lighten($border-color, 10%);
  502. }
  503. &.has-placeholder {
  504. $_hack: inline-image-store(background, $standalone-placeholder);
  505. //background-size: 12px auto;
  506. background-repeat: no-repeat;
  507. background-position: 20px 4px;
  508. .emojioneemoji {
  509. opacity: 0.4;
  510. }
  511. }
  512. }
  513. .#{$css-prefix}-button {
  514. top: 0;
  515. right: 0;
  516. bottom: 0;
  517. left: 0;
  518. width: auto;
  519. height: auto;
  520. > div {
  521. right: 6px;
  522. top: 5px;
  523. }
  524. }
  525. .#{$css-prefix}-picker {
  526. &.#{$css-prefix}-picker-position-bottom,
  527. &.#{$css-prefix}-picker-position-top {
  528. .#{$css-prefix}-wrapper:after {
  529. right: 23px;
  530. }
  531. }
  532. &.#{$css-prefix}-picker-position-left,
  533. &.#{$css-prefix}-picker-position-right {
  534. .#{$css-prefix}-wrapper:after {
  535. top: 15px;
  536. }
  537. }
  538. }
  539. }
  540. }
  541. @include inline-images-flash;