From 5e00780e29d3f16548191b69223d451595ca68d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yh=C3=ABhtozr?= Date: Sat, 17 Dec 2022 18:50:11 +0900 Subject: [PATCH 1/5] writing mode: easy CSS search and replace --- src/App.scss | 131 +++++++++-------- .../account_actions/account_actions.vue | 8 +- src/components/announcement/announcement.vue | 10 +- .../announcement_editor.vue | 4 +- .../announcements_page/announcements_page.vue | 4 +- .../async_component_error.vue | 5 +- src/components/attachment/attachment.scss | 76 +++++----- src/components/autosuggest/autosuggest.vue | 14 +- src/components/avatar_list/avatar_list.vue | 11 +- .../basic_user_card/basic_user_card.vue | 19 +-- src/components/block_card/block_card.vue | 6 +- src/components/checkbox/checkbox.vue | 14 +- src/components/color_input/color_input.scss | 27 ++-- src/components/color_input/color_input.vue | 2 +- .../contrast_ratio/contrast_ratio.vue | 8 +- src/components/conversation/conversation.vue | 52 ++++--- src/components/desktop_nav/desktop_nav.scss | 41 +++--- src/components/dialog_modal/dialog_modal.vue | 35 ++--- .../domain_mute_card/domain_mute_card.vue | 9 +- .../edit_status_modal/edit_status_modal.vue | 12 +- src/components/emoji_input/emoji_input.vue | 38 ++--- src/components/emoji_picker/emoji_picker.scss | 74 +++++----- .../emoji_reactions/emoji_reactions.vue | 24 ++-- .../extra_buttons/extra_buttons.vue | 2 +- .../favorite_button/favorite_button.vue | 3 +- src/components/flash/flash.vue | 14 +- src/components/follow_card/follow_card.vue | 13 +- .../follow_request_card.vue | 10 +- src/components/font_control/font_control.vue | 10 +- src/components/gallery/gallery.vue | 32 +++-- .../global_notice_list/global_notice_list.vue | 14 +- .../image_cropper/image_cropper.vue | 6 +- src/components/link-preview/link-preview.vue | 20 +-- src/components/list/list.vue | 6 +- src/components/list_edit/list_edit.vue | 13 +- src/components/list_new/list_new.vue | 8 +- .../list_user_search/list_user_search.vue | 7 +- .../local_bubble_panel.scss | 16 +-- src/components/login_form/login_form.vue | 13 +- src/components/media_modal/media_modal.vue | 77 +++++----- src/components/mention_link/mention_link.scss | 17 +-- .../mentions_line/mentions_line.scss | 2 +- src/components/mobile_nav/mobile_nav.vue | 44 +++--- .../mobile_post_status_button.vue | 8 +- src/components/mod_modal/mod_modal.scss | 18 +-- .../mod_modal/mod_modal_content.scss | 15 +- .../tabs/reports_tab/reports_tab.scss | 27 ++-- src/components/modal/modal.vue | 8 +- .../moderation_tools/moderation_tools.vue | 4 +- .../mrf_transparency_panel.scss | 16 +-- src/components/mute_card/mute_card.vue | 6 +- src/components/nav_panel/nav_panel.vue | 38 ++--- src/components/notification/notification.scss | 18 +-- .../notifications/notification_filters.vue | 4 +- .../notifications/notifications.scss | 50 +++---- .../panel_loading/panel_loading.vue | 2 +- .../password_reset/password_reset.vue | 19 +-- src/components/poll/poll.vue | 30 ++-- src/components/poll/poll_form.vue | 31 ++-- src/components/popover/popover.vue | 47 +++--- .../post_status_form/post_status_form.vue | 69 ++++----- .../post_status_modal/post_status_modal.vue | 10 +- src/components/quote_button/quote_button.vue | 3 +- src/components/quote_card/quote_card.vue | 20 +-- src/components/react_button/react_button.vue | 14 +- src/components/registration/registration.vue | 28 ++-- .../remote_follow/remote_follow.vue | 6 +- src/components/reply_button/reply_button.vue | 3 +- .../retweet_button/retweet_button.vue | 3 +- src/components/rich_content/rich_content.scss | 29 ++-- .../scope_selector/scope_selector.vue | 6 +- src/components/search/search.vue | 8 +- src/components/search_bar/search_bar.vue | 8 +- src/components/select/select.vue | 17 +-- .../selectable_list/selectable_list.vue | 14 +- .../helpers/modified_indicator.vue | 5 +- .../helpers/server_side_indicator.vue | 5 +- .../settings_modal/settings_modal.scss | 37 ++--- .../settings_modal_content.scss | 31 ++-- .../settings_modal/tabs/filtering_tab.vue | 2 +- .../settings_modal/tabs/general_tab.vue | 6 +- .../tabs/mutes_and_blocks_tab.scss | 15 +- .../settings_modal/tabs/profile_tab.scss | 64 +++++---- .../settings_modal/tabs/profile_tab.vue | 2 +- .../settings_modal/tabs/security_tab/mfa.vue | 6 +- .../settings_modal/tabs/theme_tab/preview.vue | 8 +- .../tabs/theme_tab/theme_tab.scss | 115 ++++++++------- .../shadow_control/shadow_control.vue | 33 +++-- src/components/side_drawer/side_drawer.vue | 39 ++--- src/components/staff_panel/staff_panel.vue | 6 +- src/components/status/status.scss | 136 +++++++++--------- src/components/status/status.vue | 4 +- src/components/status_body/status_body.scss | 48 +++---- .../status_content/status_content.vue | 10 +- .../status_history_modal.vue | 10 +- .../status_popover/status_popover.vue | 4 +- .../sticker_picker/sticker_picker.vue | 20 +-- src/components/still-image/still-image.vue | 23 +-- src/components/tab_switcher/tab_switcher.scss | 116 +++++++-------- src/components/thread_tree/thread_tree.vue | 4 +- src/components/timeline/timeline.scss | 7 +- .../timeline/timeline_quick_settings.vue | 4 +- .../timeline_menu/timeline_menu.vue | 44 +++--- .../timeline_menu/timeline_menu_content.vue | 4 +- .../timeline_menu_content.vue | 4 +- .../timeline_menu_tabs/timeline_menu_tabs.vue | 12 +- src/components/user_avatar/user_avatar.vue | 20 +-- src/components/user_card/user_card.js | 2 +- src/components/user_card/user_card.scss | 117 ++++++++------- src/components/user_card/user_card.vue | 2 +- .../user_list_popover/user_list_popover.vue | 8 +- src/components/user_profile/user_profile.vue | 37 ++--- .../user_reporting_modal.vue | 45 +++--- .../who_to_follow_panel.vue | 13 +- src/hocs/with_load_more/with_load_more.scss | 6 +- src/panel.scss | 76 ++++++---- 116 files changed, 1419 insertions(+), 1261 deletions(-) diff --git a/src/App.scss b/src/App.scss index 7e6d0dfc..3e2c5419 100644 --- a/src/App.scss +++ b/src/App.scss @@ -2,7 +2,7 @@ @import './_variables.scss'; :root { - --navbar-height: 3.5rem; + --navbar-block-size: 3.5rem; --post-line-height: 1.4; } @@ -126,7 +126,7 @@ nav { box-shadow: 0 0 4px rgba(0, 0, 0, 0.6); box-shadow: var(--topBarShadow); box-sizing: border-box; - height: var(--navbar-height); + block-size: var(--navbar-block-size); position: fixed; } @@ -135,7 +135,7 @@ nav { } .column.-scrollable { - top: var(--navbar-height); + inset-block-start: var(--navbar-block-size); position: sticky; } @@ -150,11 +150,11 @@ nav { .app-bg-wrapper { position: fixed; - height: 100%; - top: var(--navbar-height); + block-size: 100%; + inset-block-start: var(--navbar-block-size); z-index: -1000; - left: 0; - right: -20px; + inset-inline-start: 0; + inset-inline-end: -20px; background-size: cover; background-repeat: no-repeat; background-color: var(--wallpaper); @@ -185,11 +185,12 @@ nav { grid-template-areas: "sidebar content"; grid-template-rows: 1fr; box-sizing: border-box; - margin: 0 auto; + margin-block: 0; + margin-inline: auto; align-content: flex-start; flex-wrap: wrap; justify-content: center; - min-height: 100vh; + min-block-size: 100vb; overflow-x: clip; .column { @@ -200,13 +201,15 @@ nav { box-sizing: border-box; grid-row-start: 1; grid-row-end: 1; - margin: 0 calc(var(--___columnMargin) / 2); - padding: calc(var(--___columnMargin)) 0; + margin-block: 0; + margin-inline: calc(var(--___columnMargin) / 2); + padding-block: calc(var(--___columnMargin)); + padding-inline: 0; row-gap: var(--___columnMargin); align-content: start; &:not(.-scrollable) { - margin-top: var(--navbar-height); + margin-block-start: var(--navbar-block-size); } &:hover { @@ -214,46 +217,46 @@ nav { } &.-full-height { - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; + margin-block-end: 0; + padding-block-start: 0; + padding-block-end: 0; } &.-scrollable { --___paddingIncrease: calc(var(--columnGap) / 2); position: sticky; - top: var(--navbar-height); - max-height: calc(100vh - var(--navbar-height)); + inset-block-start: var(--navbar-block-size); + max-block-size: calc(100vb - var(--navbar-block-size)); overflow-y: auto; overflow-x: hidden; - margin-left: calc(var(--___paddingIncrease) * -1); - padding-left: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2); + margin-inline-start: calc(var(--___paddingIncrease) * -1); + padding-inline-start: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2); // On browsers that don't support hiding scrollbars we enforce "show scrolbars" mode // might implement old style of hiding scrollbars later if there's demand @supports (scrollbar-width: none) or (-webkit-text-fill-color: initial) { &:not(.-show-scrollbar) { scrollbar-width: none; - margin-right: calc(var(--___paddingIncrease) * -1); - padding-right: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2); + margin-inline-end: calc(var(--___paddingIncrease) * -1); + padding-inline-end: calc(var(--___paddingIncrease) + var(--___columnMargin) / 2); &::-webkit-scrollbar { display: block; - width: 0; + inline-size: 0; } } } .panel-heading.-sticky { - top: calc(var(--columnGap) / -1); + inset-block-start: calc(var(--columnGap) / -1); } } } &.-has-new-post-button { .column { - padding-bottom: 10rem; + padding-block-end: 10rem; } } @@ -261,7 +264,7 @@ nav { .column { .panel-heading.-sticky { position: relative; - top: 0; + inset-block-start: 0; } } } @@ -289,16 +292,16 @@ nav { } &.-mobile { - grid-template-columns: 100vw; + grid-template-columns: 100vi; grid-template-areas: "content"; padding: 0; .column { - margin-left: 0; - margin-right: 0; - padding-top: 0; - margin-top: var(--navbar-height); - margin-bottom: 0; + margin-inline-start: 0; + margin-inline-end: 0; + padding-block-start: 0; + margin-block-start: var(--navbar-block-size); + margin-block-end: 0; } .panel-heading, @@ -306,8 +309,8 @@ nav { .panel-heading::before, .panel, .panel::after { - border-top-left-radius: 0; - border-top-right-radius: 0; + border-start-start-radius: 0; + border-start-end-radius: 0; } #sidebar, @@ -435,7 +438,7 @@ nav { } &.-fullwidth { - width: 100%; + inline-size: 100%; } &.-hover-highlight { @@ -453,7 +456,7 @@ textarea, border-radius: 0; background: none; box-shadow: none; - height: unset; + block-size: unset; } --_padding: 0.5em; @@ -476,7 +479,8 @@ textarea, position: relative; line-height: 2; hyphens: none; - padding: 0 var(--_padding); + padding-block: 0; + padding-inline: var(--_padding); &:disabled, &[disabled=disabled], @@ -515,12 +519,12 @@ textarea, display: inline-block; content: ''; transition: box-shadow 200ms; - width: 1.1em; - height: 1.1em; + inline-size: 1.1em; + block-size: 1.1em; border-radius: 100%; // Radio buttons should always be circle box-shadow: 0 0 2px black inset; box-shadow: var(--inputShadow); - margin-right: 0.5em; + margin-inline-end: 0.5em; background-color: $fallback--fg; background-color: var(--input, $fallback--fg); vertical-align: top; @@ -554,13 +558,13 @@ textarea, display: inline-block; content: '✓'; transition: color 200ms; - width: 1.1em; - height: 1.1em; + inline-size: 1.1em; + block-size: 1.1em; border-radius: $fallback--checkboxRadius; border-radius: var(--checkboxRadius, $fallback--checkboxRadius); box-shadow: 0 0 2px black inset; box-shadow: var(--inputShadow); - margin-right: 0.5em; + margin-inline-end: 0.5em; background-color: $fallback--fg; background-color: var(--input, $fallback--fg); vertical-align: top; @@ -573,7 +577,7 @@ textarea, } } - &.resize-height { + &.resize-block-size { resize: vertical; } } @@ -603,7 +607,7 @@ option { .btn-block { display: block; - width: 100%; + inline-size: 100%; } .btn-group { @@ -616,13 +620,13 @@ option { flex: 1 1 auto; &:not(:last-child) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + border-start-end-radius: 0; + border-end-end-radius: 0; } &:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + border-start-start-radius: 0; + border-end-start-radius: 0; } } } @@ -641,10 +645,11 @@ option { box-sizing: border-box; display: inline-block; border-radius: 99px; - max-width: 10em; - min-width: 1.7em; - height: 1.3em; - padding: 0.15em 0.15em; + max-inline-size: 10em; + min-inline-size: 1.7em; + block-size: 1.3em; + padding-block: 0.15em; + padding-inline: 0.15em; vertical-align: middle; font-weight: normal; font-style: normal; @@ -664,8 +669,10 @@ option { } .alert { - margin: 0 0.35em; - padding: 0 0.25em; + margin-block: 0; + margin-inline: 0.35em; + padding-block: 0; + padding-inline: 0.25em; border-radius: $fallback--tooltipRadius; border-radius: var(--tooltipRadius, $fallback--tooltipRadius); @@ -726,13 +733,13 @@ option { } .notice-dismissible { - padding-right: 4rem; + padding-inline-end: 4rem; position: relative; .dismiss { position: absolute; - top: 0; - right: 0; + inset-block-start: 0; + inset-inline-end: 0; padding: 0.5em; color: inherit; } @@ -746,7 +753,8 @@ option { .fa-old-padding { &.svg-inline--fa { - padding: 0 0.3em; + padding-block: 0; + padding-inline: 0.3em; } } @@ -759,13 +767,14 @@ option { a { display: inline-block; - padding: 1em 0; - width: 100%; + padding-block: 1em; + padding-inline: 0; + inline-size: 100%; } } .btn.button-default { - min-height: 2em; + min-block-size: 2em; } .new-status-notification { diff --git a/src/components/account_actions/account_actions.vue b/src/components/account_actions/account_actions.vue index 126f6fa9..1919f345 100644 --- a/src/components/account_actions/account_actions.vue +++ b/src/components/account_actions/account_actions.vue @@ -110,9 +110,11 @@ @import '../../_variables.scss'; .AccountActions { .ellipsis-button { - width: 2.5em; - margin: -0.5em 0; - padding: 0.5em 0; + inline-size: 2.5em; + margin-block: -0.5em; + margin-inline: 0; + padding-block: 0.5em; + padding-inline: 0; text-align: center; &:not(:hover) .icon { diff --git a/src/components/announcement/announcement.vue b/src/components/announcement/announcement.vue index 5f64232a..42eeb72d 100644 --- a/src/components/announcement/announcement.vue +++ b/src/components/announcement/announcement.vue @@ -102,14 +102,14 @@ @import "../../variables"; .announcement { - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: var(--border, $fallback--border); + border-block-end-width: 1px; + border-block-end-style: solid; + border-block-end-color: var(--border, $fallback--border); border-radius: 0; padding: var(--status-margin, $status-margin); .heading, .body { - margin-bottom: var(--status-margin, $status-margin); + margin-block-end: var(--status-margin, $status-margin); } .footer { @@ -129,7 +129,7 @@ .btn { flex: 1; margin: 1em; - max-width: 10em; + max-inline-size: 10em; } } } diff --git a/src/components/announcement_editor/announcement_editor.vue b/src/components/announcement_editor/announcement_editor.vue index 0f29f9f7..04b6fd00 100644 --- a/src/components/announcement_editor/announcement_editor.vue +++ b/src/components/announcement_editor/announcement_editor.vue @@ -47,12 +47,12 @@ flex-direction: column; .announcement-metadata { - margin-top: 0.5em; + margin-block-start: 0.5em; } .post-textarea { resize: vertical; - height: 10em; + block-size: 10em; overflow: none; box-sizing: content-box; } diff --git a/src/components/announcements_page/announcements_page.vue b/src/components/announcements_page/announcements_page.vue index a548a8a0..aabff556 100644 --- a/src/components/announcements_page/announcements_page.vue +++ b/src/components/announcements_page/announcements_page.vue @@ -68,11 +68,11 @@ padding: var(--status-margin, $status-margin); .heading, .body { - margin-bottom: var(--status-margin, $status-margin); + margin-block-end: var(--status-margin, $status-margin); } .post-button { - min-width: 10em; + min-inline-size: 10em; } } } diff --git a/src/components/async_component_error/async_component_error.vue b/src/components/async_component_error/async_component_error.vue index 26ab5d21..795ac855 100644 --- a/src/components/async_component_error/async_component_error.vue +++ b/src/components/async_component_error/async_component_error.vue @@ -31,12 +31,13 @@ export default { diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss index 484ca0c4..1288d896 100644 --- a/src/components/attachment/attachment.scss +++ b/src/components/attachment/attachment.scss @@ -6,7 +6,7 @@ position: relative; align-self: flex-start; line-height: 0; - height: 100%; + block-size: 100%; border-style: solid; border-width: 1px; border-radius: $fallback--attachmentRadius; @@ -16,7 +16,7 @@ .attachment-wrapper { flex: 1 1 auto; - height: 200px; + block-size: 200px; position: relative; overflow: hidden; } @@ -24,9 +24,9 @@ .description-container { flex: 0 1 0; display: flex; - padding-top: 0.5em; + padding-block-start: 0.5em; z-index: 1; - max-height: 50%; + max-block-size: 50%; p { flex: 1; @@ -42,10 +42,10 @@ &.-static { position: absolute; - left: 0; - right: 0; - bottom: 0; - padding-top: 0; + inset-inline-start: 0; + inset-inline-end: 0; + inset-block-end: 0; + padding-block-start: 0; background: var(--popover); box-shadow: var(--popupShadow); } @@ -53,15 +53,15 @@ .description-field { flex: 1; - min-width: 0; + min-inline-size: 0; box-sizing: content-box; overflow: hidden; - transition: min-height 200ms 100ms; + transition: min-block-size 200ms 100ms; - padding-bottom: var(--_padding); - height: calc(var(--post-line-height) * 1em); - min-height: calc(var(--post-line-height) * 1em); + padding-block-end: var(--_padding); + block-size: calc(var(--post-line-height) * 1em); + min-block-size: calc(var(--post-line-height) * 1em); resize: none; &.scrollable-form { @@ -77,14 +77,14 @@ & .oembed-container { display: flex; justify-content: center; - width: 100%; - height: 100%; + inline-size: 100%; + block-size: 100%; } .image-container { .image { - width: 100%; - height: 100%; + inline-size: 100%; + block-size: 100%; } } @@ -92,8 +92,8 @@ & .video-container { & .flash, & video { - width: 100%; - height: 100%; + inline-size: 100%; + block-size: 100%; object-fit: contain; align-self: center; } @@ -104,8 +104,8 @@ align-items: flex-end; audio { - width: 100%; - height: 100%; + inline-size: 100%; + block-size: 100%; } } @@ -114,15 +114,15 @@ flex-direction: column; align-items: center; justify-content: center; - padding-top: 0.5em; + padding-block-start: 0.5em; } .play-icon { position: absolute; font-size: 64px; - top: calc(50% - 32px); - left: calc(50% - 32px); + inset-block-start: calc(50% - 32px); + inset-inline-start: calc(50% - 32px); color: rgba(255, 255, 255, 0.75); text-shadow: 0 0 2px rgba(0, 0, 0, 0.4); @@ -134,10 +134,10 @@ .attachment-buttons { display: flex; position: absolute; - right: 0; - top: 0; - margin-top: 0.5em; - margin-right: 0.5em; + inset-inline-end: 0; + inset-block-start: 0; + margin-block-start: 0.5em; + margin-inline-end: 0.5em; z-index: 1; .attachment-button { @@ -145,9 +145,9 @@ border-radius: $fallback--tooltipRadius; border-radius: var(--tooltipRadius, $fallback--tooltipRadius); text-align: center; - width: 2em; - height: 2em; - margin-left: 0.5em; + inline-size: 2em; + block-size: 2em; + margin-inline-start: 0.5em; font-size: 1.25em; // TODO: theming? hard to theme with unknown background image color background: rgba(230, 230, 230, 0.7); @@ -165,12 +165,12 @@ .oembed-container { line-height: 1.2em; flex: 1 0 100%; - width: 100%; - margin-right: 15px; + inline-size: 100%; + margin-inline-end: 15px; display: flex; img { - width: 100%; + inline-size: 100%; } .image { @@ -178,7 +178,7 @@ img { border: 0px; border-radius: 5px; - height: 100%; + block-size: 100%; object-fit: cover; } } @@ -221,7 +221,7 @@ color: var(--postLink, $fallback--link); overflow: hidden; white-space: nowrap; - height: auto; + block-size: auto; line-height: 1.5; &:not(.-editable) { @@ -242,7 +242,7 @@ .description-container { flex: 1; - padding-left: 0.5em; + padding-inline-start: 0.5em; } .attachment-buttons { @@ -253,7 +253,7 @@ a { display: inline-block; - max-width: 100%; + max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; } diff --git a/src/components/autosuggest/autosuggest.vue b/src/components/autosuggest/autosuggest.vue index f283ab82..89308895 100644 --- a/src/components/autosuggest/autosuggest.vue +++ b/src/components/autosuggest/autosuggest.vue @@ -31,15 +31,15 @@ &-input { display: block; - width: 100%; + inline-size: 100%; } &-results { position: absolute; - left: 0; - top: 100%; - right: 0; - max-height: 400px; + inset-inline-start: 0; + inset-block-start: 100%; + inset-inline-end: 0; + max-block-size: 400px; background-color: $fallback--bg; background-color: var(--bg, $fallback--bg); border-style: solid; @@ -48,8 +48,8 @@ border-color: var(--border, $fallback--border); border-radius: $fallback--inputRadius; border-radius: var(--inputRadius, $fallback--inputRadius); - border-top-left-radius: 0; - border-top-right-radius: 0; + border-start-start-radius: 0; + border-start-end-radius: 0; box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6); box-shadow: var(--panelShadow); overflow-y: auto; diff --git a/src/components/avatar_list/avatar_list.vue b/src/components/avatar_list/avatar_list.vue index e1b6e971..4160870a 100644 --- a/src/components/avatar_list/avatar_list.vue +++ b/src/components/avatar_list/avatar_list.vue @@ -26,20 +26,21 @@ // For hiding overflowing elements flex-wrap: wrap; - height: 24px; + block-size: 24px; .avatars-item { - margin: 0 0 5px 5px; + margin-block: 0 5px; + margin-inline: 5px 0; &:first-child { - padding-left: 5px; + padding-inline-start: 5px; } .avatar-small { border-radius: $fallback--avatarAltRadius; border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius); - height: 24px; - width: 24px; + block-size: 24px; + inline-size: 24px; } } } diff --git a/src/components/basic_user_card/basic_user_card.vue b/src/components/basic_user_card/basic_user_card.vue index eeca7828..b5811557 100644 --- a/src/components/basic_user_card/basic_user_card.vue +++ b/src/components/basic_user_card/basic_user_card.vue @@ -51,20 +51,21 @@ display: flex; flex: 1 0; margin: 0; - padding: 0.6em 1em; + padding-block: 0.6em; + padding-inline: 1em; &-collapsed-content { - margin-left: 0.7em; - text-align: left; + margin-inline-start: 0.7em; + text-align: start; flex: 1; - min-width: 0; + min-inline-size: 0; } &-user-name { img { object-fit: contain; - height: 16px; - width: 16px; + block-size: 16px; + inline-size: 16px; vertical-align: middle; } } @@ -72,7 +73,7 @@ &-user-name-value, &-screen-name { display: inline-block; - max-width: 100%; + max-inline-size: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; @@ -80,8 +81,8 @@ &-expanded-content { flex: 1; - margin-left: 0.7em; - min-width: 0; + margin-inline-start: 0.7em; + min-inline-size: 0; } } diff --git a/src/components/block_card/block_card.vue b/src/components/block_card/block_card.vue index 2fe66d4c..d0a15530 100644 --- a/src/components/block_card/block_card.vue +++ b/src/components/block_card/block_card.vue @@ -35,10 +35,10 @@ diff --git a/src/components/checkbox/checkbox.vue b/src/components/checkbox/checkbox.vue index 83695912..5989772b 100644 --- a/src/components/checkbox/checkbox.vue +++ b/src/components/checkbox/checkbox.vue @@ -37,22 +37,22 @@ export default { .checkbox { position: relative; display: inline-block; - min-height: 1.2em; + min-block-size: 1.2em; &-indicator { position: relative; - padding-left: 1.2em; + padding-inline-start: 1.2em; } &-indicator::before { position: absolute; - right: 0; - top: 0; + inset-inline-end: 0; + inset-block-start: 0; display: block; content: '✓'; transition: color 200ms; - width: 1.1em; - height: 1.1em; + inline-size: 1.1em; + block-size: 1.1em; border-radius: $fallback--checkboxRadius; border-radius: var(--checkboxRadius, $fallback--checkboxRadius); box-shadow: 0px 0px 2px black inset; @@ -96,7 +96,7 @@ export default { } & > span { - margin-left: .5em; + margin-inline-start: .5em; } } diff --git a/src/components/color_input/color_input.scss b/src/components/color_input/color_input.scss index 3451c5d9..641b86fd 100644 --- a/src/components/color_input/color_input.scss +++ b/src/components/color_input/color_input.scss @@ -6,9 +6,10 @@ &-field.input { display: inline-flex; flex: 0 0 0; - max-width: 9em; + max-inline-size: 9em; align-items: stretch; - padding: .2em 8px; + padding-block: .2em; + padding-inline: 8px; input { background: none; @@ -20,23 +21,23 @@ &.textColor { flex: 1 0 3em; - min-width: 3em; + min-inline-size: 3em; padding: 0; } &.nativeColor { flex: 0 0 2em; - min-width: 2em; + min-inline-size: 2em; align-self: center; - height: 2em; + block-size: 2em; } } .computedIndicator, .transparentIndicator { flex: 0 0 2em; - min-width: 2em; + min-inline-size: 2em; align-self: center; - height: 100%; + block-size: 100%; } .transparentIndicator { // forgot to install counter-strike source, ooops @@ -47,16 +48,16 @@ content: ''; background-color: #000000; position: absolute; - height: 50%; - width: 50%; + block-size: 50%; + inline-size: 50%; } &::after { - top: 0; - left: 0; + inset-block-start: 0; + inset-inline-start: 0; } &::before { - bottom: 0; - right: 0; + inset-block-end: 0; + inset-inline-end: 0; } } } diff --git a/src/components/color_input/color_input.vue b/src/components/color_input/color_input.vue index e84603c3..faf915d4 100644 --- a/src/components/color_input/color_input.vue +++ b/src/components/color_input/color_input.vue @@ -112,7 +112,7 @@ export default { diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 1adbe250..7910c86a 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -205,9 +205,9 @@ .conversation-dive-to-top-level-box { padding: var(--status-margin, $status-margin); - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: var(--border, $fallback--border); + border-block-end-width: 1px; + border-block-end-style: solid; + border-block-end-color: var(--border, $fallback--border); border-radius: 0; /* Make the button stretch along the whole row */ display: flex; @@ -216,8 +216,8 @@ } .thread-ancestors { - margin-left: var(--status-margin, $status-margin); - border-left: 2px solid var(--border, $fallback--border); + margin-inline-start: var(--status-margin, $status-margin); + border-inline-start: 2px solid var(--border, $fallback--border); } .thread-ancestor.-faded .StatusContent { @@ -227,10 +227,10 @@ } .thread-ancestor-dive-box { - padding-left: var(--status-margin, $status-margin); - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: var(--border, $fallback--border); + padding-inline-start: var(--status-margin, $status-margin); + border-block-end-width: 1px; + border-block-end-style: solid; + border-block-end-color: var(--border, $fallback--border); border-radius: 0; /* Make the button stretch along the whole row */ &, &-inner { @@ -244,9 +244,9 @@ } .conversation-status { - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: var(--border, $fallback--border); + border-block-end-width: 1px; + border-block-end-style: solid; + border-block-end-color: var(--border, $fallback--border); border-radius: 0; } @@ -255,24 +255,30 @@ .thread-ancestor:last-child .thread-ancestor-dive-box, &:last-child .conversation-status, &.-expanded .thread-tree .conversation-status { - border-bottom: none; + border-block-end: none; } .thread-ancestors + .thread-tree > .conversation-status { - border-top-width: 1px; - border-top-style: solid; - border-top-color: var(--border, $fallback--border); + border-block-start-width: 1px; + border-block-start-style: solid; + border-block-start-color: var(--border, $fallback--border); } /* expanded conversation in timeline */ &.status-fadein.-expanded .thread-body { - border-left-width: 4px; - border-left-style: solid; - border-left-color: $fallback--cRed; - border-left-color: var(--cRed, $fallback--cRed); - border-radius: 0 0 $fallback--panelRadius $fallback--panelRadius; - border-radius: 0 0 var(--panelRadius, $fallback--panelRadius) var(--panelRadius, $fallback--panelRadius); - border-bottom: 1px solid var(--border, $fallback--border); + border-inline-start-width: 4px; + border-inline-start-style: solid; + border-inline-start-color: $fallback--cRed; + border-inline-start-color: var(--cRed, $fallback--cRed); + border-start-start-radius: 0; + border-start-end-radius: 0; + border-end-start-radius: $fallback--panelRadius; + border-end-end-radius: $fallback--panelRadius; + border-start-start-radius: 0; + border-start-end-radius: 0; + border-end-start-radius: var(--panelRadius, $fallback--panelRadius); + border-end-end-radius: var(--panelRadius, $fallback--panelRadius); + border-block-end: 1px solid var(--border, $fallback--border); } &.-expanded.status-fadein { diff --git a/src/components/desktop_nav/desktop_nav.scss b/src/components/desktop_nav/desktop_nav.scss index 4d8c40e3..7d254948 100644 --- a/src/components/desktop_nav/desktop_nav.scss +++ b/src/components/desktop_nav/desktop_nav.scss @@ -1,7 +1,7 @@ @import '../../_variables.scss'; .DesktopNav { - width: 100%; + inline-size: 100%; input { color: var(--inputTopbarText, var(--inputText)); @@ -13,13 +13,14 @@ .inner-nav { display: grid; - grid-template-rows: var(--navbar-height); + grid-template-rows: var(--navbar-block-size); grid-template-columns: 2fr auto 2fr; grid-template-areas: "nav-left logo actions"; box-sizing: border-box; - padding: 0 1.2em; + padding-block: 0; + padding-inline: 1.2em; margin: auto; - max-width: 1110px; + max-inline-size: 1110px; } &.-logoLeft .inner-nav { @@ -71,27 +72,27 @@ background-color: $fallback--fg; background-color: var(--topBarText, $fallback--fg); position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; + inset-block-start: 0; + inset-block-end: 0; + inset-inline-start: 0; + inset-inline-end: 0; } img { display: inline-block; - height: var(--navbar-height); + block-size: var(--navbar-block-size); } } .nav-icon { - margin-left: 0.2em; - width: 2em; - height: 100%; + margin-inline-start: 0.2em; + inline-size: 2em; + block-size: 100%; text-align: center; &.router-link-active { font-size: 1.2em; - margin-top: 0.05em; + margin-block-start: 0.05em; .svg-inline--fa { font-weight: bolder; @@ -109,12 +110,12 @@ .-wide { .nav-icon { - margin-left: 0.7em; + margin-inline-start: 0.7em; } } .left { - padding-left: 5px; + padding-inline-start: 5px; display: flex; } @@ -122,9 +123,9 @@ grid-area: nav-left; .favicon { - height: 28px; + block-size: 28px; vertical-align: middle; - padding-right: 5px; + padding-inline-end: 5px; } } @@ -134,15 +135,15 @@ .item { flex: 1; - line-height: var(--navbar-height); - height: var(--navbar-height); + line-height: var(--navbar-block-size); + block-size: var(--navbar-block-size); overflow: hidden; display: flex; flex-wrap: wrap; &.right { justify-content: flex-end; - text-align: right; + text-align: end; } } } diff --git a/src/components/dialog_modal/dialog_modal.vue b/src/components/dialog_modal/dialog_modal.vue index 0feef27b..4cbfea47 100644 --- a/src/components/dialog_modal/dialog_modal.vue +++ b/src/components/dialog_modal/dialog_modal.vue @@ -30,31 +30,32 @@ // TODO: unify with other modals. .dark-overlay { &::before { - bottom: 0; + inset-block-end: 0; content: " "; display: block; cursor: default; - left: 0; + inset-inline-start: 0; position: fixed; - right: 0; - top: 0; + inset-inline-end: 0; + inset-block-start: 0; background: rgba(27,31,35,.5); z-index: 2000; } } .dialog-modal.panel { - top: 0; - left: 50%; - max-height: 80vh; - max-width: 90vw; - margin: 15vh auto; + inset-block-start: 0; + inset-inline-start: 50%; + max-block-size: 80vb; + max-inline-size: 90vi; + margin-block: 15vb; + margin-inline: auto; position: fixed; transform: translateX(-50%); z-index: 2001; cursor: default; display: block; - width: max-content; + inline-size: max-content; background-color: $fallback--bg; background-color: var(--bg, $fallback--bg); @@ -66,7 +67,8 @@ .dialog-modal-content { margin: 0; - padding: 1rem 1rem; + padding-block: 1rem; + padding-inline: 1rem; background-color: $fallback--bg; background-color: var(--bg, $fallback--bg); white-space: normal; @@ -74,17 +76,18 @@ .dialog-modal-footer { margin: 0; - padding: .5em .5em; + padding-block: .5em; + padding-inline: .5em; background-color: $fallback--bg; background-color: var(--bg, $fallback--bg); - border-top: 1px solid $fallback--border; - border-top: 1px solid var(--border, $fallback--border); + border-block-start: 1px solid $fallback--border; + border-block-start: 1px solid var(--border, $fallback--border); display: flex; justify-content: flex-end; button { - width: auto; - margin-left: .5rem; + inline-size: auto; + margin-inline-start: .5rem; } } } diff --git a/src/components/domain_mute_card/domain_mute_card.vue b/src/components/domain_mute_card/domain_mute_card.vue index 836688aa..1015ee5b 100644 --- a/src/components/domain_mute_card/domain_mute_card.vue +++ b/src/components/domain_mute_card/domain_mute_card.vue @@ -34,20 +34,21 @@ display: flex; justify-content: space-between; align-items: center; - padding: 0.6em 1em 0.6em 0; + padding-block: 0.6em 0.6em; + padding-inline: 0 1em; &-domain { - margin-right: 1em; + margin-inline-end: 1em; overflow: hidden; text-overflow: ellipsis; } button { - width: 10em; + inline-size: 10em; } .autosuggest-results & { - padding-left: 1em; + padding-inline-start: 1em; } } diff --git a/src/components/edit_status_modal/edit_status_modal.vue b/src/components/edit_status_modal/edit_status_modal.vue index 00dde7de..5d34fee3 100644 --- a/src/components/edit_status_modal/edit_status_modal.vue +++ b/src/components/edit_status_modal/edit_status_modal.vue @@ -28,17 +28,17 @@ } .edit-form-modal-panel { flex-shrink: 0; - margin-top: 25%; - margin-bottom: 2em; - width: 100%; - max-width: 700px; + margin-block-start: 25%; + margin-block-end: 2em; + inline-size: 100%; + max-inline-size: 700px; @media (orientation: landscape) { - margin-top: 8%; + margin-block-start: 8%; } .form-bottom-left { - max-width: 6.5em; + max-inline-size: 6.5em; .emoji-icon { justify-content: right; diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue index 078253c2..93910a5b 100644 --- a/src/components/emoji_input/emoji_input.vue +++ b/src/components/emoji_input/emoji_input.vue @@ -70,14 +70,15 @@ position: relative; &.with-picker input { - padding-right: 30px; + padding-inline-end: 30px; } .emoji-picker-icon { position: absolute; - top: 0; - right: 0; - margin: .2em .25em; + inset-block-start: 0; + inset-inline-end: 0; + margin-block: .2em; + margin-inline: .25em; font-size: 1.3em; cursor: pointer; line-height: 24px; @@ -90,7 +91,7 @@ .emoji-picker-panel { position: absolute; z-index: 20; - margin-top: 2px; + margin-block-start: 2px; &.hide { display: none @@ -101,19 +102,20 @@ &-panel { position: absolute; z-index: 20; - margin-top: 2px; + margin-block-start: 2px; &.hide { display: none } &-body { - margin: 0 0.5em 0 0.5em; + margin-block: 0 0; + margin-inline: 0.5em 0.5em; border-radius: $fallback--tooltipRadius; border-radius: var(--tooltipRadius, $fallback--tooltipRadius); box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); box-shadow: var(--popupShadow); - min-width: 75%; + min-inline-size: 75%; background-color: $fallback--bg; background-color: var(--popover, $fallback--bg); color: $fallback--link; @@ -130,22 +132,23 @@ &-item { display: flex; cursor: pointer; - padding: 0.2em 0.4em; - border-bottom: 1px solid rgba(0, 0, 0, 0.4); - height: 32px; + padding-block: 0.2em; + padding-inline: 0.4em; + border-block-end: 1px solid rgba(0, 0, 0, 0.4); + block-size: 32px; .image { - width: 32px; - height: 32px; + inline-size: 32px; + block-size: 32px; line-height: 32px; text-align: center; font-size: 32px; - margin-right: 4px; + margin-inline-end: 4px; img { - width: 32px; - height: 32px; + inline-size: 32px; + block-size: 32px; object-fit: contain; } } @@ -154,7 +157,8 @@ display: flex; flex-direction: column; justify-content: center; - margin: 0 0.1em 0 0.2em; + margin-block: 0 0; + margin-inline: 0.2em 0.1em; .displayText { line-height: 1.5; diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss index ac7b8b5d..58a2f2d6 100644 --- a/src/components/emoji_picker/emoji_picker.scss +++ b/src/components/emoji_picker/emoji_picker.scss @@ -2,21 +2,21 @@ .Notification { .emoji-picker { - min-width: 160%; - width: 150%; + min-inline-size: 160%; + inline-size: 150%; overflow: hidden; - left: -70%; - max-width: 100%; + inset-inline-start: -70%; + max-inline-size: 100%; @media (min-width: 800px) and (max-width: 1300px) { - left: -50%; - min-width: 50%; - max-width: 130%; + inset-inline-start: -50%; + min-inline-size: 50%; + max-inline-size: 130%; } @media (max-width: 800px) { - left: -10%; - min-width: 50%; - max-width: 130%; + inset-inline-start: -10%; + min-inline-size: 50%; + max-inline-size: 130%; } } } @@ -24,9 +24,10 @@ display: flex; flex-direction: column; position: absolute; - right: 0; - left: 0; - margin: 0 !important; + inset-inline-end: 0; + inset-inline-start: 0; + margin-block: 0; + margin-inline: !important; z-index: 100; background-color: $fallback--bg; background-color: var(--popover, $fallback--bg); @@ -50,20 +51,21 @@ } .keep-open-label { - padding: 0 7px; + padding-block: 0; + padding-inline: 7px; display: flex; } .heading { - margin-top: 10px; - height: 4.8em; + margin-block-start: 10px; + block-size: 4.8em; } .content { display: flex; flex-direction: column; flex: 1 1 auto; - min-height: 0px; + min-block-size: 0px; } .emoji-tabs { @@ -71,14 +73,14 @@ } .emoji-groups { - min-height: 200px; + min-block-size: 200px; } .additional-tabs { - border-left: 1px solid; - border-left-color: $fallback--icon; - border-left-color: var(--icon, $fallback--icon); - padding-left: 7px; + border-inline-start: 1px solid; + border-inline-start-color: $fallback--icon; + border-inline-start-color: var(--icon, $fallback--icon); + padding-inline-start: 7px; flex: 0 0 auto; } @@ -89,7 +91,7 @@ flex-wrap: nowrap; overflow: auto; - width: 100%; + inline-size: 100%; white-space: nowrap; @@ -98,14 +100,14 @@ display: inline-flex; align-items: center; justify-content: center; - width: 32px; - height: 32px; + inline-size: 32px; + block-size: 32px; padding: .4em; cursor: pointer; img { - max-width: 100%; - max-height: 100%; + max-inline-size: 100%; + max-block-size: 100%; object-fit: contain; } @@ -119,7 +121,7 @@ } &.active { - border-bottom: 4px solid; + border-block-end: 4px solid; svg { color: $fallback--lightText; @@ -142,7 +144,7 @@ display: flex; flex-direction: column; flex: 1 1 auto; - min-height: 0; + min-block-size: 0; &.hidden { opacity: 0; @@ -158,7 +160,7 @@ flex: 0 0 auto; input { - width: 100%; + inline-size: 100%; } } @@ -189,12 +191,12 @@ display: flex; align-items: center; flex-wrap: wrap; - padding-left: 5px; + padding-inline-start: 5px; justify-content: left; &-title { font-size: 0.85em; - width: 100%; + inline-size: 100%; margin: 0; &.disabled { @@ -204,8 +206,8 @@ } &-item { - width: 32px; - height: 32px; + inline-size: 32px; + block-size: 32px; box-sizing: border-box; display: flex; font-size: 32px; @@ -217,8 +219,8 @@ img { object-fit: contain; - max-width: 100%; - max-height: 100%; + max-inline-size: 100%; + max-block-size: 100%; } } diff --git a/src/components/emoji_reactions/emoji_reactions.vue b/src/components/emoji_reactions/emoji_reactions.vue index d9c568f6..e33188bc 100644 --- a/src/components/emoji_reactions/emoji_reactions.vue +++ b/src/components/emoji_reactions/emoji_reactions.vue @@ -47,7 +47,7 @@ .emoji-reactions { display: flex; - margin-top: 0.25em; + margin-block-start: 0.25em; flex-wrap: wrap; } @@ -56,16 +56,17 @@ } .emoji-reaction { - padding: 0 0.5em; - margin-right: 0.5em; - margin-top: 0.5em; + padding-block: 0; + padding-inline: 0.5em; + margin-inline-end: 0.5em; + margin-block-start: 0.5em; display: flex; align-items: center; justify-content: center; box-sizing: border-box; .reaction-emoji { - width: 2.55em !important; - margin-right: 0.25em; + inline-size: 2.55em !important; + margin-inline-end: 0.25em; } &:focus { outline: none; @@ -81,9 +82,10 @@ } .emoji-reaction-expand { - padding: 0 0.5em; - margin-right: 0.5em; - margin-top: 0.5em; + padding-block: 0; + padding-inline: 0.5em; + margin-inline-end: 0.5em; + margin-block-start: 0.5em; display: flex; align-items: center; justify-content: center; @@ -94,8 +96,8 @@ .button-default.picked-reaction { border: 1px solid var(--accent, $fallback--link); - margin-left: -1px; // offset the border, can't use inset shadows either - margin-right: calc(0.5em - 1px); + margin-inline-start: -1px; // offset the border, can't use inset shadows either + margin-inline-end: calc(0.5em - 1px); } diff --git a/src/components/extra_buttons/extra_buttons.vue b/src/components/extra_buttons/extra_buttons.vue index 9da2ad8c..9c65ad8d 100644 --- a/src/components/extra_buttons/extra_buttons.vue +++ b/src/components/extra_buttons/extra_buttons.vue @@ -213,7 +213,7 @@ .ExtraButtons { /* override of popover internal stuff */ .popover-trigger-button { - width: auto; + inline-size: auto; } .popover-trigger { diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue index 7d23572e..aeb56857 100644 --- a/src/components/favorite_button/favorite_button.vue +++ b/src/components/favorite_button/favorite_button.vue @@ -45,7 +45,8 @@ > :first-child { padding: 10px; - margin: -10px -8px -10px -10px; + margin-block: -10px -10px; + margin-inline: -10px -8px; } .action-counter { diff --git a/src/components/flash/flash.vue b/src/components/flash/flash.vue index 95f71950..bc486b37 100644 --- a/src/components/flash/flash.vue +++ b/src/components/flash/flash.vue @@ -45,18 +45,18 @@ @import '../../_variables.scss'; .Flash { display: inline-block; - width: 100%; - height: 100%; + inline-size: 100%; + block-size: 100%; position: relative; .player { - height: 100%; - width: 100%; + block-size: 100%; + inline-size: 100%; } .placeholder { - height: 100%; - width: 100%; + block-size: 100%; + inline-size: 100%; display: flex; align-items: center; justify-content: center; @@ -65,7 +65,7 @@ } .hider { - top: 0; + inset-block-start: 0; } .label { diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue index c919b11a..7104237b 100644 --- a/src/components/follow_card/follow_card.vue +++ b/src/components/follow_card/follow_card.vue @@ -46,15 +46,16 @@ } &-button { - margin-top: 0.5em; - padding: 0 1.5em; - margin-left: 1em; + margin-block-start: 0.5em; + padding-block: 0; + padding-inline: 1.5em; + margin-inline-start: 1em; } &-follow-button { - margin-top: 0.5em; - margin-left: auto; - width: 10em; + margin-block-start: 0.5em; + margin-inline-start: auto; + inline-size: 10em; } } diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue index 835471e7..bd13f092 100644 --- a/src/components/follow_request_card/follow_request_card.vue +++ b/src/components/follow_request_card/follow_request_card.vue @@ -47,14 +47,14 @@ flex-direction: row; flex-wrap: wrap; button { - margin-top: 0.5em; - margin-right: 0.5em; + margin-block-start: 0.5em; + margin-inline-end: 0.5em; flex: 1 1; - max-width: 12em; - min-width: 8em; + max-inline-size: 12em; + min-inline-size: 8em; &:last-child { - margin-right: 0; + margin-inline-end: 0; } } } diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue index f100c3a9..bc256f2b 100644 --- a/src/components/font_control/font_control.vue +++ b/src/components/font_control/font_control.vue @@ -53,17 +53,17 @@ @import '../../_variables.scss'; .font-control { input.custom-font { - min-width: 10em; + min-inline-size: 10em; } &.custom { /* TODO Should make proper joiners... */ .font-switcher { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + border-start-end-radius: 0; + border-end-end-radius: 0; } .custom-font { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + border-start-start-radius: 0; + border-end-start-radius: 0; } } } diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue index 3e0d23b6..776d78af 100644 --- a/src/components/gallery/gallery.vue +++ b/src/components/gallery/gallery.vue @@ -96,18 +96,18 @@ .gallery-row { position: relative; - height: 0; - width: 100%; + block-size: 0; + inline-size: 100%; flex-grow: 1; &:not(:first-child) { - margin-top: 0.5em; + margin-block-start: 0.5em; } } &.-long { .gallery-rows { - max-height: 25em; + max-block-size: 25em; overflow: hidden; mask: linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat, @@ -135,14 +135,15 @@ line-height: 2; button { - padding: 0 2em; + padding-block: 0; + padding-inline: 2em; } } .gallery-row { &.-grid, &.-minimal { - height: auto; + block-size: auto; .gallery-row-inner { position: relative; } @@ -151,18 +152,18 @@ .gallery-row-inner { position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; + inset-block-start: 0; + inset-inline-start: 0; + inset-inline-end: 0; + inset-block-end: 0; display: flex; flex-direction: row; flex-wrap: nowrap; align-content: stretch; &.-grid { - width: 100%; - height: auto; + inline-size: 100%; + block-size: auto; position: relative; display: grid; grid-column-gap: 0.5em; @@ -176,12 +177,13 @@ } .gallery-item { - margin: 0 0.5em 0 0; + margin-block: 0 0; + margin-inline: 0 0.5em; flex-grow: 1; - height: 100%; + block-size: 100%; box-sizing: border-box; // to make failed images a bit more noticeable on chromium - min-width: 2em; + min-inline-size: 2em; &:last-child { margin: 0; } diff --git a/src/components/global_notice_list/global_notice_list.vue b/src/components/global_notice_list/global_notice_list.vue index ddc45b81..da2bd804 100644 --- a/src/components/global_notice_list/global_notice_list.vue +++ b/src/components/global_notice_list/global_notice_list.vue @@ -29,8 +29,8 @@ .global-notice-list { position: fixed; - top: 50px; - width: 100%; + inset-block-start: 50px; + inline-size: 100%; pointer-events: none; z-index: 1001; display: flex; @@ -40,12 +40,12 @@ .global-notice { pointer-events: auto; text-align: center; - width: 40em; - max-width: calc(100% - 3em); + inline-size: 40em; + max-inline-size: calc(100% - 3em); display: flex; - padding-left: 1.5em; + padding-inline-start: 1.5em; line-height: 2; - margin-bottom: 0.5em; + margin-block-end: 0.5em; .notice-message { flex: 1 1 100%; @@ -87,7 +87,7 @@ } .close-notice { - padding-right: 0.2em; + padding-inline-end: 0.2em; .svg-inline--fa:hover { opacity: 0.6; } diff --git a/src/components/image_cropper/image_cropper.vue b/src/components/image_cropper/image_cropper.vue index 8c48a387..57225c8b 100644 --- a/src/components/image_cropper/image_cropper.vue +++ b/src/components/image_cropper/image_cropper.vue @@ -60,15 +60,15 @@ img { display: block; - max-width: 100%; + max-inline-size: 100%; } } &-buttons-wrapper { - margin-top: 10px; + margin-block-start: 10px; button { - margin-top: 5px; + margin-block-start: 5px; } } } diff --git a/src/components/link-preview/link-preview.vue b/src/components/link-preview/link-preview.vue index 220527f2..174c3cbe 100644 --- a/src/components/link-preview/link-preview.vue +++ b/src/components/link-preview/link-preview.vue @@ -40,15 +40,15 @@ flex-direction: row; cursor: pointer; overflow: hidden; - margin-top: 0.5em; + margin-block-start: 0.5em; .card-image { flex-shrink: 0; - width: 120px; - max-width: 25%; + inline-size: 120px; + max-inline-size: 25%; img { - width: 100%; - height: 100%; + inline-size: 100%; + block-size: 100%; object-fit: cover; border-radius: $fallback--attachmentRadius; border-radius: var(--attachmentRadius, $fallback--attachmentRadius); @@ -56,7 +56,7 @@ } .card-content { - max-height: 100%; + max-block-size: 100%; margin: 0.5em; display: flex; flex-direction: column; @@ -67,18 +67,20 @@ } .card-description { - margin: 0.5em 0 0 0; + margin-block: 0.5em 0; + margin-inline: 0 0; overflow: hidden; text-overflow: ellipsis; word-break: break-word; line-height: 1.2em; // cap description at 3 lines, the 1px is to clean up some stray pixels // TODO: fancier fade-out at the bottom to show off that it's too long? - max-height: calc(1.2em * 3 - 1px); + max-block-size: calc(1.2em * 3 - 1px); } .nsfw-alert { - margin: 2em 0; + margin-block: 2em; + margin-inline: 0; } color: $fallback--text; diff --git a/src/components/list/list.vue b/src/components/list/list.vue index a6223cce..7c537e79 100644 --- a/src/components/list/list.vue +++ b/src/components/list/list.vue @@ -39,9 +39,9 @@ export default { .list { &-item:not(:last-child) { - border-bottom: 1px solid; - border-bottom-color: $fallback--border; - border-bottom-color: var(--border, $fallback--border); + border-block-end: 1px solid; + border-block-end-color: $fallback--border; + border-block-end-color: var(--border, $fallback--border); } &-empty-content { diff --git a/src/components/list_edit/list_edit.vue b/src/components/list_edit/list_edit.vue index af46c4b8..243548a1 100644 --- a/src/components/list_edit/list_edit.vue +++ b/src/components/list_edit/list_edit.vue @@ -72,19 +72,20 @@ .list-edit { .input-wrap { display: flex; - margin: 0.7em 0.5em 0.7em 0.5em; + margin-block: 0.7em 0.7em; + margin-inline: 0.5em 0.5em; input { - width: 100%; + inline-size: 100%; } } .search-icon { - margin-right: 0.3em; + margin-inline-end: 0.3em; } .member-list { - padding-bottom: 0.7rem; + padding-block-end: 0.7rem; } .basic-user-card:hover, @@ -96,9 +97,9 @@ .go-back-button { text-align: center; line-height: 1; - height: 100%; + block-size: 100%; align-self: start; - width: var(--__panel-heading-height-inner); + inline-size: var(--__panel-heading-block-size-inner); } .btn { diff --git a/src/components/list_new/list_new.vue b/src/components/list_new/list_new.vue index a713b852..2d8e1f03 100644 --- a/src/components/list_new/list_new.vue +++ b/src/components/list_new/list_new.vue @@ -67,11 +67,11 @@ .list-new { .search-icon { - margin-right: 0.3em; + margin-inline-end: 0.3em; } .member-list { - padding-bottom: 0.7rem; + padding-block-end: 0.7rem; } .basic-user-card:hover, @@ -83,9 +83,9 @@ .go-back-button { text-align: center; line-height: 1; - height: 100%; + block-size: 100%; align-self: start; - width: var(--__panel-heading-height-inner); + inline-size: var(--__panel-heading-block-size-inner); } .btn { diff --git a/src/components/list_user_search/list_user_search.vue b/src/components/list_user_search/list_user_search.vue index fcd2f7da..532e1fe8 100644 --- a/src/components/list_user_search/list_user_search.vue +++ b/src/components/list_user_search/list_user_search.vue @@ -31,15 +31,16 @@ .input-wrap { display: flex; - margin: 0.7em 0.5em 0.7em 0.5em; + margin-block: 0.7em 0.7em; + margin-inline: 0.5em 0.5em; input { - width: 100%; + inline-size: 100%; } } .search-icon { - margin-right: 0.3em; + margin-inline-end: 0.3em; } diff --git a/src/components/local_bubble_panel/local_bubble_panel.scss b/src/components/local_bubble_panel/local_bubble_panel.scss index 80ea01d4..421be4da 100644 --- a/src/components/local_bubble_panel/local_bubble_panel.scss +++ b/src/components/local_bubble_panel/local_bubble_panel.scss @@ -2,20 +2,20 @@ margin: 1em; table { - width:100%; - text-align: left; - padding-left:10px; - padding-bottom:20px; + inline-size:100%; + text-align: start; + padding-inline-start:10px; + padding-block-end:20px; th, td { - width: 180px; - max-width: 360px; + inline-size: 180px; + max-inline-size: 360px; overflow: hidden; - vertical-align: text-top; + vertical-align: text-block-start; } th+th, td+td { - width: auto; + inline-size: auto; } } } diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue index 21482977..83deb5a3 100644 --- a/src/components/login_form/login_form.vue +++ b/src/components/login_form/login_form.vue @@ -101,8 +101,8 @@ padding: 0.6em; .btn { - min-height: 2em; - width: 10em; + min-block-size: 2em; + inline-size: 10em; } .register { @@ -110,7 +110,7 @@ } .login-bottom { - margin-top: 1.0em; + margin-block-start: 1.0em; display: flex; flex-direction: row; align-items: center; @@ -120,17 +120,18 @@ .form-group { display: flex; flex-direction: column; - padding: 0.3em 0.5em 0.6em; + padding-block: 0.3em 0.6em; + padding-inline: 0.5em; line-height:24px; } .form-bottom { display: flex; padding: 0.5em; - height: 32px; + block-size: 32px; button { - width: 10em; + inline-size: 10em; } p { diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 802a60b3..ed0b1b54 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -74,7 +74,7 @@ >