Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dir-dependent float with logical properties #14671

Merged
merged 2 commits into from
Mar 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"use strict";

const autoprefixer = require("autoprefixer");
const postcssCalc = require("postcss-calc");
const postcssDirPseudoClass = require("postcss-dir-pseudo-class");
const postcssLogical = require("postcss-logical");
const fs = require("fs");
Expand Down Expand Up @@ -853,7 +852,6 @@ function buildGeneric(defines, dir) {
preprocessCSS("web/viewer.css", defines)
.pipe(
postcss([
postcssCalc(),
postcssLogical({ preserve: true }),
postcssDirPseudoClass(),
autoprefixer(AUTOPREFIXER_CONFIG),
Expand Down Expand Up @@ -936,7 +934,6 @@ function buildComponents(defines, dir) {
preprocessCSS("web/pdf_viewer.css", defines)
.pipe(
postcss([
postcssCalc(),
postcssLogical({ preserve: true }),
postcssDirPseudoClass(),
autoprefixer(AUTOPREFIXER_CONFIG),
Expand Down Expand Up @@ -1033,7 +1030,6 @@ function buildMinified(defines, dir) {
preprocessCSS("web/viewer.css", defines)
.pipe(
postcss([
postcssCalc(),
postcssLogical({ preserve: true }),
postcssDirPseudoClass(),
autoprefixer(AUTOPREFIXER_CONFIG),
Expand Down
24 changes: 0 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"mkdirp": "^1.0.4",
"needle": "^3.0.0",
"postcss": "^8.4.7",
"postcss-calc": "^8.2.4",
"postcss-dir-pseudo-class": "^6.0.4",
"postcss-logical": "^5.0.4",
"prettier": "^2.5.1",
Expand Down
81 changes: 22 additions & 59 deletions web/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ select {
}
html[dir="ltr"] #sidebarContainer {
transition-property: left;
left: calc(0px - var(--sidebar-width));
left: calc(-1 * var(--sidebar-width));
border-right: var(--doorhanger-border-color-whcm);
}
html[dir="rtl"] #sidebarContainer {
transition-property: right;
right: calc(0px - var(--sidebar-width));
right: calc(-1 * var(--sidebar-width));
border-left: var(--doorhanger-border-color-whcm);
}

Expand Down Expand Up @@ -668,46 +668,31 @@ html[dir="rtl"] .secondaryToolbar {
transform: translateX(-50%);
}

html[dir="ltr"] #toolbarViewerLeft,
html[dir="rtl"] #toolbarViewerRight,
html[dir="ltr"] #toolbarSidebarLeft,
html[dir="rtl"] #toolbarSidebarRight {
float: left;
}
html[dir="ltr"] #toolbarViewerRight,
html[dir="rtl"] #toolbarViewerLeft,
html[dir="ltr"] #toolbarSidebarRight,
html[dir="rtl"] #toolbarSidebarLeft {
float: right;
#toolbarViewerLeft,
#toolbarSidebarLeft {
float: inline-start;
}
html[dir="ltr"] #toolbarViewerLeft > *,
html[dir="ltr"] #toolbarViewerMiddle > *,
html[dir="ltr"] #toolbarViewerRight > *,
html[dir="ltr"] #toolbarSidebarLeft *,
html[dir="ltr"] #toolbarSidebarRight *,
html[dir="ltr"] .findbar * {
position: relative;
float: left;
#toolbarViewerRight,
#toolbarSidebarRight {
float: inline-end;
}
html[dir="rtl"] #toolbarViewerLeft > *,
html[dir="rtl"] #toolbarViewerMiddle > *,
html[dir="rtl"] #toolbarViewerRight > *,
html[dir="rtl"] #toolbarSidebarLeft *,
html[dir="rtl"] #toolbarSidebarRight *,
html[dir="rtl"] .findbar * {

#toolbarViewerLeft > *,
#toolbarViewerMiddle > *,
#toolbarViewerRight > *,
#toolbarSidebarLeft *,
#toolbarSidebarRight *,
.findbar * {
position: relative;
float: right;
float: inline-start;
}

.splitToolbarButton {
margin: 2px 2px 0;
display: inline-block;
}
html[dir="ltr"] .splitToolbarButton > .toolbarButton {
float: left;
}
html[dir="rtl"] .splitToolbarButton > .toolbarButton {
float: right;
.splitToolbarButton > .toolbarButton {
float: inline-start;
}

.toolbarButton,
Expand Down Expand Up @@ -764,6 +749,7 @@ html[dir="rtl"] .splitToolbarButton > .toolbarButton:first-child {
margin: 0;
}
.splitToolbarButtonSeparator {
float: inline-start;
padding: 10px 0;
width: 1px;
background-color: var(--separator-color);
Expand All @@ -778,13 +764,6 @@ html[dir="rtl"] .splitToolbarButton > .toolbarButton:first-child {
padding: 13px 0;
}

html[dir="ltr"] .splitToolbarButtonSeparator {
float: left;
}
html[dir="rtl"] .splitToolbarButtonSeparator {
float: right;
}

.toolbarButton,
.dropdownToolbarButton,
.secondaryToolbarButton,
Expand Down Expand Up @@ -1230,14 +1209,9 @@ html[dir="rtl"] .toolbarButton.pdfSidebarNotification::after {
}

.thumbnail {
float: inline-start;
margin: 0 10px 5px;
}
html[dir="ltr"] .thumbnail {
float: left;
}
html[dir="rtl"] .thumbnail {
float: right;
}

#thumbnailView > a:last-of-type > .thumbnail {
margin-bottom: 10px;
Expand Down Expand Up @@ -1332,11 +1306,13 @@ a:focus > .thumbnail > .thumbnailSelectionRing,

.treeItemToggler {
position: relative;
float: inline-start;
height: 0;
width: 0;
color: rgba(255, 255, 255, 0.5);
}
.treeItemToggler::before {
inset-inline-end: 4px;
mask-image: var(--treeitem-expanded-icon);
}
.treeItemToggler.treeItemsHidden::before {
Expand All @@ -1348,18 +1324,6 @@ html[dir="rtl"] .treeItemToggler.treeItemsHidden::before {
.treeItemToggler.treeItemsHidden ~ .treeItems {
display: none;
}
html[dir="ltr"] .treeItemToggler {
float: left;
}
html[dir="rtl"] .treeItemToggler {
float: right;
}
html[dir="ltr"] .treeItemToggler::before {
right: 4px;
}
html[dir="rtl"] .treeItemToggler::before {
left: 4px;
}

.treeItem.selected > a {
background-color: var(--treeitem-selected-bg-color);
Expand Down Expand Up @@ -1396,7 +1360,6 @@ html[dir="rtl"] .treeItemToggler::before {
#errorMessageLeft {
float: left;
}

#errorMessageRight {
float: right;
}
Expand Down