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 d96c77d7b7c..d61e02cc5a4 100644 --- a/resources/css/components/fieldtypes/bard.css +++ b/resources/css/components/fieldtypes/bard.css @@ -9,15 +9,17 @@ } .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:p-2 text-md leading-normal; + @apply @lg:p-4; } .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 +40,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; @@ -81,7 +77,7 @@ } button sup { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + @apply font-sans; } } @@ -205,10 +201,14 @@ .bard-set-selector { /* transition: all .15s ease-in-out; */ - .dropdown-menu { + /* .dropdown-menu { left: -5px; right: auto; - } + } */ +} + +.set-picker .popover .popover-content { + min-width: 320px !important; } 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..b8f155d5c7a 100644 --- a/resources/css/components/tabs.css +++ b/resources/css/components/tabs.css @@ -67,9 +67,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..d6675970dbc 100644 --- a/resources/css/components/toggle.css +++ b/resources/css/components/toggle.css @@ -24,15 +24,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 +38,7 @@ position: absolute; top: -1px; width: 20px; - height: 22px; + height: 20px; border-radius: 20px; transition: all 0.2s ease; @@ -67,8 +65,8 @@ } .toggle-container.on { + @apply bg-green-light border-green; .toggle-slider { - @apply bg-green-light; width: 44px; } @@ -105,7 +103,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..472dc24ca94 100644 --- a/resources/css/core/utilities.css +++ b/resources/css/core/utilities.css @@ -7,7 +7,7 @@ } .focus-outline { - @apply border-blue-300; + @apply border border-blue-200; outline: 0; box-shadow: 0 0 0 0.2rem rgba(0,125,255,.25); } diff --git a/resources/css/elements/forms.css b/resources/css/elements/forms.css index de3db6f9311..bd72472d45e 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,6 +25,7 @@ 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; @@ -155,8 +149,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 { @@ -251,7 +244,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 +285,3 @@ input[type="file"] { } } -@screen md { - .form-group { - @apply p-6; - } -} 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"> -