diff --git a/app/css/components/loading-bar.css b/app/css/components/loading-bar.css index d3682a53bf..9a19524970 100644 --- a/app/css/components/loading-bar.css +++ b/app/css/components/loading-bar.css @@ -1,3 +1,12 @@ +@keyframes progress0To100 { + from { + width: 0%; + } + to { + width: 100%; + } +} + .c-loading-bar { @apply w-100 rounded-100; @apply bg-veryLightBlue; diff --git a/app/css/packs/editor.css b/app/css/packs/editor.css new file mode 100644 index 0000000000..f60670ce38 --- /dev/null +++ b/app/css/packs/editor.css @@ -0,0 +1,6 @@ +@import "../minimal_tailwind.css"; +@import "../ui-kit/minimal.css"; + +@import "../pages/editor"; +@import "../modals/editor-hints"; +@import "../components/chatgpt"; diff --git a/app/css/packs/website.css b/app/css/packs/website.css index 06c69b65a2..9c12d7b0c1 100644 --- a/app/css/packs/website.css +++ b/app/css/packs/website.css @@ -129,7 +129,6 @@ @import "../components/widgets/exercise"; @import "../components/mentor-discussion-post-editor"; @import "../components/test-run"; -@import "../components/chatgpt"; @import "../components/alert"; @import "../components/diff"; @import "../components/cli-walkthrough"; @@ -139,7 +138,6 @@ @import "../modals/bug-report"; @import "../modals/donations-form"; -@import "../modals/editor-hints"; @import "../modals/automated-feedback"; @import "../modals/generic-confirmation"; @import "../modals/generic-destructive"; @@ -181,7 +179,6 @@ @import "../pages/individual_supporters"; @import "../pages/organisation_supporters"; @import "../pages/organisation_supporter"; -@import "../pages/editor"; @import "../pages/notifications"; @import "../pages/blog"; @import "../pages/blog-post"; diff --git a/app/css/pages/editor.css b/app/css/pages/editor.css index a7a3590a8d..310991503c 100644 --- a/app/css/pages/editor.css +++ b/app/css/pages/editor.css @@ -1,11 +1,41 @@ -@import "../styles"; +@layer base { + .scroll-x-editor-rhs { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + + -webkit-overflow-scrolling: touch; + + @apply overflow-x-auto; + -webkit-mask-image: linear-gradient( + to right, + transparent, + white 20px, + white 95%, + transparent + ); + mask-image: linear-gradient( + to right, + transparent, + white 20px, + white 95%, + transparent + ); + @apply pl-20 pr-[5%]; + + &::-webkit-scrollbar { + @apply h-[6px]; + } -@keyframes progress0To100 { - from { - width: 0%; - } - to { - width: 100%; + &::-webkit-scrollbar-thumb { + @apply rounded-8 bg-gray; + --tw-bg-opacity: 0.5; + } + + &::-webkit-scrollbar-thumb:hover { + --tw-bg-opacity: 1; + } } } diff --git a/app/css/ui-kit/all.css b/app/css/ui-kit/all.css index 161364393d..383d55f4c0 100644 --- a/app/css/ui-kit/all.css +++ b/app/css/ui-kit/all.css @@ -1,3 +1,4 @@ +@import "./misc"; @import "./styles"; @import "./animations"; @import "./borders"; diff --git a/app/css/ui-kit/minimal.css b/app/css/ui-kit/minimal.css index efe919e922..6a6105b902 100644 --- a/app/css/ui-kit/minimal.css +++ b/app/css/ui-kit/minimal.css @@ -8,5 +8,7 @@ /* @import "./ui-kit/filters"; */ /* @import "./ui-kit/scroll"; */ +@import "./misc"; @import "./text"; @import "./buttons"; +@import "./filters"; diff --git a/app/css/ui-kit/misc.css b/app/css/ui-kit/misc.css new file mode 100644 index 0000000000..8dccb9c269 --- /dev/null +++ b/app/css/ui-kit/misc.css @@ -0,0 +1,5 @@ +@layer base { + .uses-suspense { + @apply relative; + } +} diff --git a/app/css/ui-kit/scroll.css b/app/css/ui-kit/scroll.css index 98851a7411..c6bdc70d68 100644 --- a/app/css/ui-kit/scroll.css +++ b/app/css/ui-kit/scroll.css @@ -31,43 +31,4 @@ mask-image: none; } } - - .scroll-x-editor-rhs { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - -webkit-overflow-scrolling: touch; - - @apply overflow-x-auto; - -webkit-mask-image: linear-gradient( - to right, - transparent, - white 20px, - white 95%, - transparent - ); - mask-image: linear-gradient( - to right, - transparent, - white 20px, - white 95%, - transparent - ); - @apply pl-20 pr-[5%]; - - &::-webkit-scrollbar { - @apply h-[6px]; - } - - &::-webkit-scrollbar-thumb { - @apply rounded-8 bg-gray; - --tw-bg-opacity: 0.5; - } - - &::-webkit-scrollbar-thumb:hover { - --tw-bg-opacity: 1; - } - } } diff --git a/app/css/ui-kit/styles.css b/app/css/ui-kit/styles.css index fd56d7eefa..974aad823c 100644 --- a/app/css/ui-kit/styles.css +++ b/app/css/ui-kit/styles.css @@ -87,8 +87,4 @@ @apply text-textColor2 font-normal leading-140; @apply border-b-1 border-textColor2; } - - .uses-suspense { - @apply relative; - } } diff --git a/app/views/tracks/exercises/edit.html.haml b/app/views/tracks/exercises/edit.html.haml index 1930bcd659..9c38247462 100644 --- a/app/views/tracks/exercises/edit.html.haml +++ b/app/views/tracks/exercises/edit.html.haml @@ -1 +1,3 @@ +- require_stylesheet "editor" + = ReactComponents::Editor.new(@solution)