diff --git a/resources/css/components/assets.css b/resources/css/components/assets.css index 66a68ed0da2..a6445dfadf9 100644 --- a/resources/css/components/assets.css +++ b/resources/css/components/assets.css @@ -146,9 +146,7 @@ ========================================================================== */ .asset-tile { - @apply bg-white; - min-width: 0; - position: relative; + @apply bg-white relative min-w-0; .asset-thumb { @apply flex justify-center items-center; @@ -157,152 +155,60 @@ } } + .asset-thumb-container:hover .asset-controls { + @apply block; + } + .asset-meta { @apply border-t w-full text-2xs text-gray-700; } .asset-filename { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + @apply truncate; } .asset-controls { @apply absolute hidden; } - - .asset-thumb-container:hover .asset-controls { - display: block; - } } .asset-tile.selected { @apply border-blue; box-shadow: 0 0 0 1px theme('colors.blue.DEFAULT'); +} +.asset-thumbnail { + @apply border border-white; } /* The Asset Editor ========================================================================== */ -@media all and (max-width: 800px) { - .asset-editor-meta-items .meta-item { - display: none; - } -} - .asset-editor { - display: flex; - flex-direction: column; - position: relative; - background: white; - height: 100%; - - .loading { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 10; - background: rgba(255, 255, 255, 0.7); - @apply flex items-center justify-center; - } - - .editor-main { - flex-grow: 1; - display: flex; - justify-content: space-between; - } - .editor-preview { - flex-basis: 64%; - flex-grow: 1; - } - - .editor-form { - flex-basis: 36%; - } - - .editor-meta { - display: flex; - border-bottom: 1px solid #e0e0e0; - } -} - -.asset-editor-meta-items { - @apply flex flex-1 items-center; - - .meta-item { - @apply flex items-start flex-col border-l px-4 h-full justify-center; - cursor: text; - } - - .meta-label { - @apply block p-0 text-sm text-gray-800; - } - - .meta-value { - @apply block p-0 text-xs text-gray-600; - } -} - -.asset-editor-meta-actions { - display: flex; - align-items: center; - height: 60px; - - button { - display: block; - height: 100%; - display: flex; - align-items: center; - padding: 0 25px; - - &:not(:first-child) { - @apply border; + .editor-preview-image { + @apply flex flex-col flex-1 p-8; } - svg { opacity: .75; } - &:hover svg { opacity: 1; } - } -} -.asset-editor .editor-preview { - @apply bg-gray-800 flex flex-col justify-between; - - .editor-preview-image { - flex: 1; - padding: 30px; - display: flex; - flex-direction: column; - } - - .image-wrapper { - flex: 1 1 auto; - position: relative; - - > * { - @apply absolute w-auto h-auto max-w-full max-h-full; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - box-shadow: 0 0 32px rgba(0, 0, 0, .35); + .image-wrapper { + flex: 1 1 auto; + position: relative; + + > * { + @apply absolute w-auto h-auto max-w-full max-h-full; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + box-shadow: 0 0 32px rgba(0, 0, 0, .35); + } } } - .editor-file-actions { - @apply bg-gray-900 p-4 text-center h-16; - - button { - @apply mx-1; - } + .loading { + @apply absolute inset-0 z-10 bg-white/70 flex items-center justify-center rounded; } } -.asset-thumbnail { - border: 1px solid white; -} - /* Lazyloading ========================================================================== */ diff --git a/resources/css/components/fieldtypes/assets.css b/resources/css/components/fieldtypes/assets.css index 5edcec20621..6af1713e64c 100644 --- a/resources/css/components/fieldtypes/assets.css +++ b/resources/css/components/fieldtypes/assets.css @@ -7,14 +7,14 @@ } .assets-fieldtype .assets-fieldtype-picker { - @apply flex items-center px-4 py-2 bg-gray-200 border rounded; + @apply flex flex-col @sm:flex-row items-start @sm:items-center px-4 py-2 bg-gray-200 border rounded; &.is-expanded { @apply border-b-0 rounded-b-none; } .asset-upload-control { - @apply ml-4; + @apply mt-2 @sm:ml-4 @sm:mt-0 text-xs text-gray-600 leading-tight; } .upload-text-button { diff --git a/resources/css/components/fieldtypes/bard.css b/resources/css/components/fieldtypes/bard.css index 894ed320321..4aecdbbdc3f 100644 --- a/resources/css/components/fieldtypes/bard.css +++ b/resources/css/components/fieldtypes/bard.css @@ -2,22 +2,23 @@ @apply border rounded relative outline-none; * { outline: none; } - - &:focus-within { - @apply focus-outline; - } } .bard-editor { - @apply text-gray-800 bg-gray-100 shadow-inner p-0 relative; + @apply text-gray-800 bg-gray-100 shadow-inner p-0 relative rounded; } .bard-editor .ProseMirror { - @apply p-2 min-h-40; + @apply p-1 min-h-40 text-sm leading-tight; + @apply @sm/bard:p-2 text-md leading-normal; + @apply @lg/bard:p-4; + &:focus { + @apply ring-2 ring-inset ring-blue-200; + } } .bard-editor .bard-invalid { - @apply p-2 bg-red-lighter text-red text-xs whitespace-nowrap; + @apply p-2 @lg:px-4 bg-red-lighter text-red text-xs whitespace-nowrap; } /* Modes */ @@ -38,12 +39,6 @@ } } -/* Responive Wangjangling */ -@screen md { - .bard-editor .ProseMirror { @apply p-4; } - .bard-editor .bard-invalid { @apply px-4; } -} - .bard-fixed-toolbar { @apply bg-white shadow-none rounded-t border-b text-sm flex items-start justify-between; position: sticky; @@ -57,7 +52,7 @@ width: 32px; margin: 0; svg { - @apply w-4 h-4; + @apply w-auto h-4; } } @@ -81,7 +76,7 @@ } button sup { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + @apply font-sans; } } @@ -89,12 +84,13 @@ @apply bg-black rounded-full shadow-lg px-4; button { - @apply focus-none text-gray-700 rounded px-1 flex items-center justify-center text-base text-center bg-transparent; + @apply text-gray-700 rounded px-1 flex items-center justify-center text-base text-center bg-transparent; height: 32px; width: 32px; margin: 0 2px; + outline: none; svg { - @apply w-4 h-4; + @apply w-auto h-4; } } diff --git a/resources/css/components/fieldtypes/markdown.css b/resources/css/components/fieldtypes/markdown.css index f72fabbeb85..86a7429c302 100644 --- a/resources/css/components/fieldtypes/markdown.css +++ b/resources/css/components/fieldtypes/markdown.css @@ -5,10 +5,6 @@ .markdown-fieldtype-wrapper { @apply border rounded overflow-hidden relative; - &:focus-within { - @apply focus-outline; - } - .markdown-toolbar { @apply bg-white shadow-none rounded-t border-b text-sm flex items-center justify-between; padding: 4px 8px; @@ -26,14 +22,10 @@ } &.active { - @apply bg-gray-300 text-black; + @apply bg-gray-300 text-black; } } - .markdown-buttons button:focus { - @apply focus-outline; - } - .markdown-buttons button:disabled { @apply opacity-50; &:hover { @@ -61,12 +53,16 @@ @apply bg-gray-100 shadow-inner h-auto font-mono leading-normal p-3 text-xs; border-radius: 0 0 3px 3px; + &:focus-within { + @apply ring-2 ring-inset ring-blue-200; + } + .cm-comment { @apply font-mono text-sm } } - CodeMirror-code { min-height: 100px; } + .CodeMirror-code { min-height: 100px; } .helpers { @apply border-t text-xs text-gray-800 flex items-center; diff --git a/resources/css/components/fieldtypes/table.css b/resources/css/components/fieldtypes/table.css index 7f317822dcc..00e2e59423d 100644 --- a/resources/css/components/fieldtypes/table.css +++ b/resources/css/components/fieldtypes/table.css @@ -74,5 +74,11 @@ .table-fieldtype-table .row-controls { @apply w-8 pl-0 text-center; - vertical-align: center; + vertical-align: middle; + &:focus-within { + @apply bg-gray-200; + button { + @apply outline-none ring-0; + } + } } diff --git a/resources/css/components/publish.css b/resources/css/components/publish.css index 06d0fdfebad..3c8d4e93ae4 100644 --- a/resources/css/components/publish.css +++ b/resources/css/components/publish.css @@ -41,14 +41,12 @@ code.parent-url { } .publish-fields { - display: flex; - flex-wrap: wrap; + @apply flex flex-wrap; .form-group { > label, .field-inner > label { - font-weight: 500; - margin-bottom: 8px; + @apply font-medium mb-2; } } @@ -65,14 +63,8 @@ code.parent-url { } .read-only-overlay { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; + @apply absolute inset-0 cursor-not-allowed bg-white/25; z-index: 100; - cursor: not-allowed; - background: rgba(255, 255, 255, 0.25); } } @@ -87,7 +79,6 @@ code.parent-url { .publish-sidebar { @apply shrink-0; margin-left: 20px; - width: 300px; .publish-section-actions { @@ -112,33 +103,3 @@ code.parent-url { .publish-section:not(:empty) { @apply shadow bg-white rounded-md w-full; } - - - -/* Inline publish form - Used in popovers and in the asset editor modal. - ========================================================================== */ - -.editor-form { - position: relative; - - .editor-form-fields { - /* Could have done this with flexbox but firefox was pushing */ - /* out the height if there were many publish fields. */ - position: absolute; - top: 0; - left: 0; - bottom: 71px; - right: 0; - overflow: auto; - } - - .editor-form-actions { - @apply absolute p-4 h-16 border-t bottom-0 inset-x-0; - z-index: 2; - } - - .publish-fields .form-group { - @apply px-4 pt-2 - } -} diff --git a/resources/css/components/tabs.css b/resources/css/components/tabs.css index 5fca7b6759d..22c9b7f2ca4 100644 --- a/resources/css/components/tabs.css +++ b/resources/css/components/tabs.css @@ -37,17 +37,24 @@ min-height: 94%; } + .tab-button:hover { + @apply bg-white; + } + .tab-button:active { + @apply bg-white text-blue; + } + + .tab-button:focus { + @apply bg-white text-blue border-b-0 ring-1 ring-inset; + } + .tab-button.active { @apply bg-white text-blue border-t-2 border-blue relative h-full min-h-full border-b-0 outline-none; z-index: 1; } - .tab-button:active { - @apply bg-white text-blue border-b-0 outline-none; - } - .tab-button:focus { - @apply bg-white text-blue border-b-0 focus-outline; + @apply border-t; } .tab-button.ghost { @@ -67,9 +74,6 @@ } } -.tab-panel:focus { - @apply focus-outline; -} @screen md { .tabs .tab-button { diff --git a/resources/css/components/toggle.css b/resources/css/components/toggle.css index 1d0cf604b11..96ec0d5394f 100644 --- a/resources/css/components/toggle.css +++ b/resources/css/components/toggle.css @@ -6,6 +6,9 @@ height: 32px; display: flex; align-items: center; + &:focus-within .toggle-container { + @apply ring-2; + } .inline-label { @apply ml-2 font-normal text-gray-700; @@ -24,15 +27,13 @@ } .toggle-container { - background: #fff; + @apply bg-white cursor-pointer relative border; height: 22px; width: 46px; border-radius: 20px; - cursor: pointer; - position: relative; - border: 1px solid #dfdfdf; font-size: 0.1px; margin: 6px 0; + transition: background-color 0.2s ease; &:focus { outline: none; } } @@ -40,7 +41,7 @@ position: absolute; top: -1px; width: 20px; - height: 22px; + height: 20px; border-radius: 20px; transition: all 0.2s ease; @@ -67,8 +68,8 @@ } .toggle-container.on { + @apply bg-green-light border-green; .toggle-slider { - @apply bg-green-light; width: 44px; } @@ -105,7 +106,7 @@ } .toggle-container.on .toggle-slider { - width: 22px; + width: 19px; } } diff --git a/resources/css/core/utilities.css b/resources/css/core/utilities.css index d3543fee2db..c15af3c0324 100644 --- a/resources/css/core/utilities.css +++ b/resources/css/core/utilities.css @@ -7,13 +7,13 @@ } .focus-outline { - @apply border-blue-300; + @apply border border-blue-300; outline: 0; box-shadow: 0 0 0 0.2rem rgba(0,125,255,.25); } .focus-none { - @apply border-0; + /* @apply border-0; */ outline: 0; box-shadow: none; } @@ -79,14 +79,10 @@ } .clickable { - @apply text-gray-800 select-none cursor-pointer border; - border: 1px solid #c4cdd6; - background: linear-gradient(180deg, #fff, #f9fafb); - box-shadow: 0 1px 0 0 rgba(25,30,35,.05); + @apply text-gray-800 select-none cursor-pointer border bg-gradient-to-b from-white to-gray-100; &:hover { - background: linear-gradient(180deg, #f9fafb, #f4f6f8); - border-color: #c4cdd5; + @apply border-gray-500 from-white to-gray-200; } } diff --git a/resources/css/elements/buttons.css b/resources/css/elements/buttons.css index 077849398cb..3c13dd90bd1 100644 --- a/resources/css/elements/buttons.css +++ b/resources/css/elements/buttons.css @@ -17,7 +17,7 @@ button { padding: .475rem 1.25rem; &:focus { - @apply focus-outline; + @apply ring-2 outline-none; } &:disabled { @@ -181,6 +181,9 @@ button { padding: .475rem .5rem; &.btn-flat { @apply border-r-0; } } + .btn:focus { + @apply ring-inset; + } } diff --git a/resources/css/elements/forms.css b/resources/css/elements/forms.css index de3db6f9311..f8e82b455d1 100644 --- a/resources/css/elements/forms.css +++ b/resources/css/elements/forms.css @@ -10,16 +10,9 @@ input { @apply placeholder:text-gray-600; } -input[type="checkbox"] { - font-size: 18px; - position: relative; - top: 1px; -} - +input[type="checkbox"], input[type="radio"] { - font-size: 18px; - position: relative; - top: 1px; + @apply text-lg; } select { @@ -32,17 +25,13 @@ select { .input-text { @apply appearance-none bg-gray-100 text-gray-800 max-w-full w-full border p-2 rounded shadow-inner placeholder:text-gray-600; + @apply border; transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; &:not(textarea) { - height: 38px; + height: 2.375rem; } - - &:focus, &:focus-within { - @apply focus-outline; - } - } /* Used inside tables, grids, and so on */ @@ -68,13 +57,14 @@ input.input-text-minimal:read-only, .input-group { @apply appearance-none text-gray-800 w-full p-0 rounded flex items-center; - height: 38px; + height: 2.375rem; &:not(.focus-within-only):focus, &:not(.focus-within-only):focus-within { - @apply focus-outline; + @apply ring-2 ring-blue-300; .input-text:focus, .input-group-prepend:focus, .input-group-append:focus, .input-group-item:focus { - @apply focus-none; + outline: 0; + box-shadow: none; } } @@ -95,7 +85,7 @@ input.input-text-minimal:read-only, background: linear-gradient(180deg, #fff, #f9fafb); border: 1px solid #c4cdd6; box-shadow: 0 1px 0 0 rgba(25,30,35,.05); - height: 38px; + height: 2.375rem; line-height: 36px; &button { @@ -155,8 +145,7 @@ input.input-text-minimal:read-only, @apply mt-3 flex items-center; input { - @apply leading-normal mr-1 relative; - top: -1px; + @apply leading-normal mr-1; } label { @@ -186,10 +175,6 @@ input.input-text-minimal:read-only, .select-input-container { @apply rounded relative; - &:focus, &:focus-within { - @apply focus-outline; - } - select { @apply text-sm text-gray-800 shadow-button cursor-pointer block w-full h-full text-left relative max-w-full; @apply select-none rounded leading-normal align-middle whitespace-nowrap appearance-none subpixel-antialiased; @@ -200,10 +185,6 @@ input.input-text-minimal:read-only, letter-spacing: -0.01em; padding: .475rem 1.75rem .475rem .75rem; - &:focus { - @apply focus-outline; - } - &:hover:not(:disabled), &:active:not(:disabled) { background: linear-gradient(180deg, #f9fafb, #f4f6f8); border-color: #c4cdd5; @@ -251,7 +232,7 @@ input[type="file"] { /* Form groups ========================================================================== */ .form-group { - @apply p-3 m-0; + @apply p-3 @sm:p-4 @lg:p-6 m-0; label { font-weight: 500; @@ -292,8 +273,3 @@ input[type="file"] { } } -@screen md { - .form-group { - @apply p-6; - } -} diff --git a/resources/css/vendors/vue-select.css b/resources/css/vendors/vue-select.css index 16ef7d3a087..71642bfd506 100644 --- a/resources/css/vendors/vue-select.css +++ b/resources/css/vendors/vue-select.css @@ -1,7 +1,5 @@ .v-select { - @apply rounded min-w-0; - position: relative; - font-family: inherit + @apply rounded min-w-0 relative font-sans; } .vs__fade-enter-active, @@ -46,13 +44,13 @@ } .vs__dropdown-toggle { - @apply appearance-none text-gray-800 w-full p-0 rounded flex items-center; + @apply appearance-none text-gray-800 w-full p-0 rounded flex items-center bg-gray-100 shadow-inner border border-gray-500; height: 2.375rem; transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; - &:focus, &:focus-within { - @apply focus-outline; + &:focus-within { + @apply ring-2; } .vs--disabled & { @@ -70,8 +68,8 @@ .v-select:not(.vs--unsearchable) .vs__selected-options { @apply appearance-none text-gray-800 text-sm; - @apply flex flex-wrap flex-1 border border-gray-500 border-r-0 rounded-l relative h-full; - box-shadow: inset 1px 1px 1px 0px rgba(0,0,0,.05); + @apply flex flex-wrap flex-1 rounded-l relative h-full; + /* box-shadow: inset 1px 1px 1px 0px rgba(0,0,0,.05); */ padding: 5px 8px; line-height: 1.5; width: calc(100% - 34px); @@ -90,12 +88,13 @@ .vs--single.vs--unsearchable .vs__selected-options { @apply clickable; - @apply flex flex-1 rounded-l relative h-full border-r-0; + @apply flex flex-1 rounded-l relative h-full border-0; width: calc(100% - 34px); } .vs__actions { - @apply flex items-center; + @apply flex items-center rounded-r; + height: 2.375rem; } .vs--searchable .vs__dropdown-toggle { @@ -108,16 +107,13 @@ .vs__open-indicator { @apply clickable; - @apply flex items-center rounded-r px-2 text-sm shrink-0; - height: 2.375rem; + @apply flex items-center rounded-r px-2 text-sm shrink-0 h-full border-r-0; + /* height: 2.375rem; */ } .vs__open-indicator svg { - @apply flex items-center text-gray-900; - height: 16px; - width: 16px; - -webkit-transform: scale(1); - transform: scale(1); + @apply flex items-center text-gray-900 relative w-4 h-4; + transform: translateY(1px) scale(1); transition: -webkit-transform .15s cubic-bezier(1, -.115, .975, .855); transition: transform .15s cubic-bezier(1, -.115, .975, .855); transition: transform .15s cubic-bezier(1, -.115, .975, .855), -webkit-transform .15s cubic-bezier(1, -.115, .975, .855); @@ -126,7 +122,7 @@ .vs--open .vs__open-indicator svg { -webkit-transform: rotate(180deg) scale(1); - transform: rotate(180deg) scale(1) + transform: rotate(180deg) scale(1) translateY(0px); } .vs--loading .vs__open-indicator { @@ -134,12 +130,7 @@ } .vs__clear { - @apply text-gray-900 px-2 cursor-pointer shadow-inner text-base bg-transparent; - height: 2.375rem; - box-shadow: inset -1px 1px 1px 0px rgba(0,0,0,.05); - border-top: 1px solid #c4cdd6; - border-bottom: 1px solid #c4cdd6; - background-color: transparent; + @apply text-gray-900 px-2 cursor-pointer text-base bg-transparent shadow-none; &:hover { @apply text-blue; } @@ -187,7 +178,7 @@ @apply flex items-center cursor-pointer text-gray-600 ml-1 p-0 outline-none; &:hover { - @apply text-gray-800; + @apply text-gray-700; } &:focus { @@ -195,10 +186,7 @@ } span { - flex-shrink: 0; - font-size: 17px; - font-weight: 700; - padding-top: 1px; + @apply text-md shrink-0 font-thin; } } @@ -231,7 +219,7 @@ .vs__search, .vs__search:focus { - @apply appearance-none text-sm text-gray-800 px-2 border-transparent outline-none m-0 p-0 bg-transparent max-w-full; + @apply appearance-none text-sm text-gray-800 pr-2 border-transparent outline-none m-0 p-0 bg-transparent max-w-full; line-height: 1.4; border-left: none; box-shadow: none; diff --git a/resources/js/components/assets/Editor/Editor.vue b/resources/js/components/assets/Editor/Editor.vue index 7eb88144b16..9848e728fcc 100644 --- a/resources/js/components/assets/Editor/Editor.vue +++ b/resources/js/components/assets/Editor/Editor.vue @@ -5,7 +5,7 @@ :full="true" @closed="close"> -