Skip to content

A free, self-hostable news aggregator…

refactor(themes): centralize sidebar width via --width-aside token (#8761)

polybjorn80a93a994f3d
diff --git a/p/themes/Swage/swage.css b/p/themes/Swage/swage.css
index c972e4785..9a81ec014 100644
--- a/p/themes/Swage/swage.css
+++ b/p/themes/Swage/swage.css
@@ -758,7 +758,6 @@ main.post .drop-section li.item.feed a:hover .icon {
vertical-align: middle;
&.title {
- width: var(--width-aside);
position: absolute;
text-align: center;
@@ -812,7 +811,6 @@ main.post .drop-section li.item.feed a:hover .icon {
.aside {
background-color: var(--color-background-aside);
padding-top: 2.5rem;
- width: var(--width-aside);
&.aside_feed {
.tree {
@@ -1124,7 +1122,6 @@ main.post .drop-section li.item.feed a:hover .icon {
}
#nav_entries {
- width: var(--width-aside);
background-color: var(--color-background-aside);
}
diff --git a/p/themes/Swage/swage.rtl.css b/p/themes/Swage/swage.rtl.css
index 2e2c64191..3aedb638e 100644
--- a/p/themes/Swage/swage.rtl.css
+++ b/p/themes/Swage/swage.rtl.css
@@ -758,7 +758,6 @@ main.post .drop-section li.item.feed a:hover .icon {
vertical-align: middle;
&.title {
- width: var(--width-aside);
position: absolute;
text-align: center;
@@ -812,7 +811,6 @@ main.post .drop-section li.item.feed a:hover .icon {
.aside {
background-color: var(--color-background-aside);
padding-top: 2.5rem;
- width: var(--width-aside);
&.aside_feed {
.tree {
@@ -1124,7 +1122,6 @@ main.post .drop-section li.item.feed a:hover .icon {
}
#nav_entries {
- width: var(--width-aside);
background-color: var(--color-background-aside);
}
diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.css
index 4ad483a17..299dfb7e2 100644
--- a/p/themes/base-theme/frss.css
+++ b/p/themes/base-theme/frss.css
@@ -44,6 +44,8 @@
--frss-padding-flux-items: 0.75rem;
--frss-padding-top-bottom: 0.5rem;
+ --width-aside: 300px;
+
line-height: 1.5;
}
@@ -1280,7 +1282,7 @@ li.drag-hover {
}
.header > .item.title {
- width: 300px;
+ width: var(--width-aside);
text-align: center;
white-space: nowrap;
}
@@ -1328,7 +1330,7 @@ input[type="search"] {
.aside {
display: table-cell;
- width: 300px;
+ width: var(--width-aside);
vertical-align: top;
}
@@ -1935,7 +1937,7 @@ a.website:hover .favicon {
display: flex;
position: fixed;
bottom: 0; left: 0;
- width: 300px;
+ width: var(--width-aside);
padding-bottom: env(safe-area-inset-bottom);
z-index: 50;
}
@@ -2414,7 +2416,7 @@ html.slider-active {
.reader .aside.visible {
display: table-cell;
- width: 300px;
+ width: var(--width-aside);
}
.reader .flux {
@@ -2499,9 +2501,9 @@ html.slider-active {
display: none;
}
- /* Material navigation drawer: theme override or 320px cap, with 56px touch-peek */
+ /* Material navigation drawer: theme width, capped at viewport minus 56px touch-peek */
.aside.visible {
- width: min(var(--width-aside, 320px), calc(100vw - 56px));
+ width: min(var(--width-aside), calc(100vw - 56px));
height: 100vh;
box-shadow: 3px 3px 5px var(--frss-box-shadow-color-transparent);
}
diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.css
index bac85b5b8..d9e7321bd 100644
--- a/p/themes/base-theme/frss.rtl.css
+++ b/p/themes/base-theme/frss.rtl.css
@@ -44,6 +44,8 @@
--frss-padding-flux-items: 0.75rem;
--frss-padding-top-bottom: 0.5rem;
+ --width-aside: 300px;
+
line-height: 1.5;
}
@@ -1280,7 +1282,7 @@ li.drag-hover {
}
.header > .item.title {
- width: 300px;
+ width: var(--width-aside);
text-align: center;
white-space: nowrap;
}
@@ -1328,7 +1330,7 @@ input[type="search"] {
.aside {
display: table-cell;
- width: 300px;
+ width: var(--width-aside);
vertical-align: top;
}
@@ -1935,7 +1937,7 @@ a.website:hover .favicon {
display: flex;
position: fixed;
bottom: 0; right: 0;
- width: 300px;
+ width: var(--width-aside);
padding-bottom: env(safe-area-inset-bottom);
z-index: 50;
}
@@ -2414,7 +2416,7 @@ html.slider-active {
.reader .aside.visible {
display: table-cell;
- width: 300px;
+ width: var(--width-aside);
}
.reader .flux {
@@ -2499,9 +2501,9 @@ html.slider-active {
display: none;
}
- /* Material navigation drawer: theme override or 320px cap, with 56px touch-peek */
+ /* Material navigation drawer: theme width, capped at viewport minus 56px touch-peek */
.aside.visible {
- width: min(var(--width-aside, 320px), calc(100vw - 56px));
+ width: min(var(--width-aside), calc(100vw - 56px));
height: 100vh;
box-shadow: -3px 3px 5px var(--frss-box-shadow-color-transparent);
}