artifact.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. @import "vars";
  2. @import "mixins";
  3. .artifact {
  4. position: relative;
  5. //-webkit-transform: translate3d(0,0,0); // hw accel
  6. iframe {
  7. width: 100% !important;
  8. display: block;
  9. max-height: 100%;
  10. }
  11. &.hide-text .text { opacity: 0 }
  12. &.locked.selected {
  13. box-shadow: 0px 0px 0px 3px rgba(0,0,0,0.5) !important;
  14. }
  15. .placeholder {
  16. .btn {
  17. position: absolute;
  18. top: 50%;
  19. left: 50%;
  20. margin: -22px;
  21. }
  22. }
  23. /*&.artifact-text.text-blank [contentEditable=true]:not(.text-editing) p:first-child::after {
  24. content: "Double click to edit";
  25. opacity: 0.25;
  26. }
  27. &.artifact-text.text-blank [contentEditable=true].text-editing p:first-child::after {
  28. content: "Type here";
  29. opacity: 0.25;
  30. }*/
  31. &.artifact-text.text-blank p:first-child br {
  32. display: none;
  33. }
  34. .link-wrapper {
  35. position: absolute;
  36. width: 100%;
  37. top: 100%;
  38. display: block;
  39. text-align: center;
  40. max-width: 100%;
  41. overflow-x: hidden;
  42. margin-top: -3em;
  43. }
  44. .edit {
  45. position: absolute;
  46. top: 10px;
  47. right: 10px;
  48. }
  49. .ios-focuser {
  50. position: absolute;
  51. top: 0;
  52. right: 0;
  53. width: 20px;
  54. opacity: 0;
  55. z-index: 0;
  56. }
  57. .text {
  58. overflow: hidden;
  59. width: auto;
  60. height: auto;
  61. height: 100%;
  62. //pointer-events: none;
  63. // handle glyphs that go beyond text box sides
  64. // padding-left: 20px; margin-left: -20px;
  65. // padding-right: 20px; margin-right: -20px;
  66. //> * {pointer-events: auto; }
  67. }
  68. &:not(.artifact-text) {
  69. // this collapses empty captions of images, media etc
  70. // but doesn't collapse empty notes
  71. .text-column:not(.text-editing):empty {
  72. display: none !important;
  73. }
  74. }
  75. &.x-spacedeck-shape .clip {
  76. height: 100%;
  77. }
  78. .shape {
  79. position: absolute;
  80. }
  81. .text-table {
  82. display: table;
  83. width: 100%;
  84. height: 100%;
  85. .text-cell {
  86. display: table-cell;
  87. position: relative;
  88. height: 100%;
  89. .text-column {
  90. width: 100%;
  91. -webkit-line-break: after-white-space;
  92. display: block;
  93. word-wrap: break-word;
  94. line-height: 1.5em;
  95. font-size: $font-size;
  96. &.text-editing {
  97. min-height: $font-size;
  98. // without this, there is no text editing in safari
  99. -webkit-user-select: auto;
  100. -moz-user-select: auto;
  101. user-select: auto;
  102. pointer-events: auto;
  103. * {
  104. -webkit-user-select: auto;
  105. -moz-user-select: auto;
  106. user-select: auto;
  107. }
  108. }
  109. p:last-child,
  110. ul:last-child {
  111. margin-bottom: 0em !important;
  112. }
  113. h1,
  114. h2,
  115. li {
  116. margin-top: 0;
  117. margin-bottom: 0.5em;
  118. &:last-child {margin-bottom: 0em !important; }
  119. }
  120. h1 {
  121. line-height: 1.1; // legacy
  122. }
  123. h2 {
  124. font-size: 40px; // legacy
  125. line-height: 1.1;
  126. }
  127. h3 {
  128. font-size: 30px; // legacy
  129. line-height: 1.1;
  130. }
  131. h4 {
  132. font-size: 20px; // legacy
  133. line-height: 1.1;
  134. }
  135. blockquote {
  136. // legacy
  137. font-size: inherit;
  138. font-weight: inherit;
  139. margin-left: 20px;
  140. margin-right: 20px;
  141. }
  142. h3,
  143. h4,
  144. h5,
  145. ul,
  146. p {
  147. margin-top: 0;
  148. margin-bottom: 0.5em; // compatibility to old system
  149. &:last-child {margin-bottom: 0em !important; }
  150. }
  151. a {pointer-events: none; }
  152. ol {
  153. padding: 0;
  154. counter-reset: list-counter;
  155. li {
  156. list-style: none;
  157. position: relative;
  158. padding-left: 1em;
  159. counter-increment: list-counter;
  160. font-size: inherit;
  161. &:before {
  162. color: inherit;
  163. top: 0;
  164. left: 0;
  165. content: counter(list-counter);
  166. position: absolute;
  167. }
  168. }
  169. }
  170. ul {
  171. padding: 0;
  172. li {
  173. list-style: none;
  174. position: relative;
  175. padding-left: 1em;
  176. font-size: inherit;
  177. &:before {
  178. color: inherit;
  179. top: 0;
  180. left: 0;
  181. content: "\2022";
  182. position: absolute;
  183. }
  184. }
  185. }
  186. li,
  187. p {
  188. -webkit-hyphens: auto;
  189. -moz-hyphens: auto;
  190. -ms-hyphens: auto;
  191. -o-hyphens: auto;
  192. hyphens: auto;
  193. }
  194. * {
  195. -webkit-backface-visibility: visible;
  196. -moz-backface-visibility: visible;
  197. -ms-backface-visibility: visible;
  198. backface-visibility: visible;
  199. }
  200. > * {
  201. display: block;
  202. }
  203. }
  204. }
  205. }
  206. .oembed,
  207. div[class*='oembed-'] {
  208. height: 100%;
  209. .play {
  210. position: absolute;
  211. top: 50%;
  212. left: 50%;
  213. margin: -30px;
  214. z-index: 100;
  215. background-color: $light !important;
  216. color: $darker !important;
  217. }
  218. .meta {
  219. padding-top: 10px;
  220. font-size: 10px;
  221. display: block;
  222. position: absolute;
  223. top: 100%;
  224. width: 100%;
  225. z-index: 100;
  226. color: $medium;
  227. text-align: left;
  228. .link {
  229. position: absolute;
  230. left: -12px;
  231. bottom: -4px;
  232. }
  233. .description {
  234. padding-left: 28px;
  235. display: block;
  236. }
  237. }
  238. iframe {
  239. width: 100% !important;
  240. height: 100% !important;
  241. }
  242. &:not(.interactive) {
  243. iframe {
  244. pointer-events: none;
  245. }
  246. }
  247. .title {font-size: 20px; }
  248. .image {
  249. height: auto;
  250. top: 0;
  251. bottom: 0px;
  252. position: absolute;
  253. width: 100%;
  254. }
  255. .interact {
  256. position: absolute;
  257. top: 50%;
  258. left: 50%;
  259. margin-left: -30px;
  260. margin-top: -30px;
  261. }
  262. }
  263. .image {
  264. height: 100%;
  265. background-position: center top;
  266. background-size: cover;
  267. background-repeat: no-repeat;
  268. video {
  269. width: 100%;
  270. height: 100%;
  271. }
  272. }
  273. .video {
  274. width: 100%;
  275. height: 100%;
  276. background-size: cover;
  277. .title {
  278. position: absolute;
  279. bottom: 0px;
  280. left: 0px;
  281. z-index: 1;
  282. color: $medium;
  283. background-color: white;
  284. display: block;
  285. width: 100%;
  286. padding: 10px 15px;
  287. font-size: 10px;
  288. }
  289. video {
  290. width: 100%;
  291. height: 100%;
  292. }
  293. .tl-controls {
  294. position: absolute;
  295. bottom: 10px;
  296. left: 10px;
  297. right: 10px;
  298. text-align: center;
  299. .btn {
  300. margin-top: 20px;
  301. }
  302. }
  303. }
  304. // FIXME: fix later
  305. /*&.vector {
  306. pointer-events: none;
  307. div, svg {
  308. pointer-events: none;
  309. }
  310. svg * {
  311. pointer-events: painted;
  312. }
  313. }*/
  314. .audio {
  315. height: 100%;
  316. .timeline {
  317. position: absolute;
  318. left:0;
  319. top:0;
  320. width: 100%;
  321. bottom: 54px;
  322. background-size: 100% 100%;
  323. cursor: crosshair;
  324. margin-bottom: 10px;
  325. overflow: hidden;
  326. .tl-current-time {
  327. height:100%;
  328. background: white;
  329. opacity: 0.5;
  330. border-right: 1px solid #888;
  331. //transition: width 0.05s linear;
  332. }
  333. .tl-inpoint {
  334. width: 1px;
  335. bottom: 0px;
  336. background: #333;
  337. position: absolute;
  338. top: 0px;
  339. z-index: 1;
  340. }
  341. .tl-outpoint {
  342. width: 1px;
  343. bottom: 0px;
  344. background: #333;
  345. position: absolute;
  346. top: 0px;
  347. z-index: 2;
  348. }
  349. }
  350. .tl-controls {
  351. position: absolute;
  352. bottom: 10px;
  353. left: 10px;
  354. right: 10px;
  355. text-align: center;
  356. .btn {
  357. margin-top: 20px;
  358. }
  359. }
  360. .tl-title {
  361. margin-left:10px;
  362. max-width: 55%;
  363. overflow: hidden;
  364. display: inline-block;
  365. max-height: 2em;
  366. text-overflow: ellipsis;
  367. white-space: nowrap;
  368. margin-top: -18px;
  369. margin-bottom: -18px;
  370. margin-right: 10px;
  371. }
  372. .tl-times {
  373. }
  374. }
  375. img {
  376. // pointer-events:none;
  377. width: 100%;
  378. height: 100%;
  379. }
  380. &.bold { font-weight: bold;}
  381. &.italic { font-style: italic;}
  382. &.underline { text-decoration: underline;}
  383. &.strike { text-decoration: line-through;}
  384. &.align-top .text-cell {vertical-align: top;}
  385. &.align-middle .text-cell {vertical-align: middle;}
  386. &.align-bottom .text-cell {vertical-align: bottom;}
  387. &.align-left { text-align: left; }
  388. &.align-center { text-align: center; }
  389. &.align-right { text-align: right; }
  390. &.align-justify { text-align: justify; }
  391. audio {
  392. width: 100%;
  393. }
  394. }
  395. .board .artifact {
  396. position: absolute;
  397. color: black;
  398. //@include user-select(none);
  399. white-space: normal;
  400. font-size: 18px;
  401. &.artifact-zone {
  402. border: 1px solid rgba(46,204,113,1);
  403. background-color: rgba(46,204,113,0.025);
  404. border-radius: 10px;
  405. &:after {display: none; }
  406. .shape {display: none; }
  407. .zone {
  408. height: 100%;
  409. }
  410. }
  411. }
  412. body.present-mode {
  413. #space {
  414. .artifact-zone {
  415. display: none;
  416. }
  417. .artifact {
  418. cursor: default !important;
  419. .text a { pointer-events: auto !important; }
  420. }
  421. }
  422. }
  423. body:not(.present-mode) {
  424. #space {
  425. .Medium {
  426. cursor: text;
  427. }
  428. .artifact {
  429. &.selected.text-editing,
  430. &.text-editing {
  431. cursor: text;
  432. &:before {
  433. border: 1px solid rgba(255,255,255,0.25);
  434. }
  435. &:after {
  436. border: 1px dotted rgba(40,140,215,0.5);
  437. background-color: transparent !important;
  438. }
  439. }
  440. &.selected {
  441. cursor: -webkit-grab;
  442. cursor: -moz-grab;
  443. &:active {
  444. cursor: -webkit-grabbing;
  445. cursor: -moz-grabbing;
  446. }
  447. &:not(.artifact-vector):after {
  448. border: 1px solid rgba(40,140,215,1);
  449. // overlay color removed for now (messes with colors)
  450. //background-color: rgba(40,140,215,0.35);
  451. }
  452. }
  453. }
  454. }
  455. }
  456. .mouse-scribble, .tool-scribble, .tool-line, .tool-arrow {
  457. cursor: crosshair !important;
  458. .artifact {
  459. pointer-events: none !important;
  460. }
  461. .artifact:after, .artifact:before {
  462. display: none !important;
  463. }
  464. }
  465. .tool-pan {
  466. cursor: grab !important;
  467. }
  468. .artifact.state-idle {
  469. .progress, .progress-text {
  470. display: none;
  471. }
  472. }
  473. .artifact.state-processing, .artifact.state-uploading {
  474. .progress {
  475. height: 100%;
  476. padding: 10px;
  477. background-color: $blue;
  478. opacity: 0.9;
  479. text-align: center;
  480. }
  481. .progress-text {
  482. text-align: center;
  483. padding: 8px;
  484. width: 100%;
  485. position: absolute;
  486. left: 0px;
  487. top: 0px;
  488. color: #888;
  489. font-size: 10px;
  490. }
  491. video, audio, .tl-controls, .timeline {
  492. display: none;
  493. }
  494. background-color: white;
  495. }
  496. .state-processing .spinner {
  497. opacity: 1;
  498. background-image: url('/images/hourglass.gif');
  499. }
  500. .state-uploading .spinner {
  501. opacity: 0.8;
  502. background-image: url('/images/hourglass.gif');
  503. }
  504. .state-idle .spinner {
  505. display: none;
  506. }
  507. .artifact.image {
  508. background-color: transparent;
  509. &.state-loading { background-color: rgba(40,140,215,0.05);}
  510. &.state-processing { background-color: rgba(107,195,111,0.05);}
  511. }
  512. .spinner {
  513. height:44px;
  514. width:44px;
  515. position:absolute;
  516. top: 50%;
  517. left: 50%;
  518. margin: -22px;
  519. border-radius:100%;
  520. background-size: cover;
  521. background-repeat: no-repeat;
  522. }
  523. #pick-mobile {
  524. img {
  525. width: 200px;
  526. }
  527. .artifact {
  528. display: block;
  529. width: 200px;
  530. height: 150px;
  531. float: left;
  532. font-size: 14px;
  533. line-height: 20px;
  534. .text {
  535. padding: 10px;
  536. }
  537. }
  538. .spinner {
  539. display: none !important;
  540. }
  541. .video {
  542. height: 100%;
  543. }
  544. }
  545. // fix player button offset
  546. .icon-controls-play:before {
  547. line-height: 40px !important;
  548. left: 1px !important;
  549. }