Files
FreshRSS/p/themes/Ansum/_components.css
polybjorn 1ff27fea21 fix(themes): replace #load_more loading-state GIF with a CSS spinner (#8804)
* fix(themes): replace #load_more loading-state GIF with a CSS spinner

In its `.loading` state, the "Load more" button kept its `.btn` frame and the spinner inside was hard to see or invisible across themes. Replaces the GIF with a base-theme CSS spinner inheriting `currentColor`, drops the button frame, respects `prefers-reduced-motion`, and renders crisply at any DPI. Per-theme `#load_more.loading` overrides in Nord, Flat, Mapco, Ansum and Swage become redundant and are removed; a now-redundant `font-size: 0` rule in `base.css` is also dropped.

* fix(themes): use border-rotation spinner for older-browser compat

Replaces conic-gradient + mask + aspect-ratio (Firefox 83+, Safari 15.4+) with border + rotate, supported in Gecko since Firefox 16 (2012) and Blink/WebKit since 2015. Visual difference: a ring with a rotating gap instead of a tapered arc. currentColor inheritance and prefers-reduced-motion handling are preserved.

* fix(themes): regenerate RTL spinner stylesheet

rtlcss flips border-right-color to border-left-color for RTL; the manual port of the spinner block missed it. Regenerated via npm run rtlcss.

Reworked the spinner with border + rotate instead of conic-gradient + mask + aspect-ratio. 

<img width="35" height="36" alt="Screenshot 2026-05-11 at 11 05 43" src="https://github.com/user-attachments/assets/e065efc9-9d6c-4369-8390-f0e89db81952" />

Oldest browser versions still supported: Firefox 16 (2012), SeaMonkey 2.13 (2012), Chrome 43 (2015), Safari 9 (2015), Edge 12 (2015). Below those, `@keyframes` and `animation` would need `-webkit-` fallbacks.

Verified now working in SeaMonkey 2.53.23. Couldn't test feed clicks or page reload there because login itself hits a separate cookie issue.
---------

Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
2026-05-11 16:30:08 +02:00

282 lines
4.4 KiB
CSS

/*=== COMPONENTS */
/*===============*/
/*=== Forms */
/* parti dans _forms.css */
/*=== Horizontal-list */
.horizontal-list {
padding: 0.1rem 0;
& > .item {
&:first-child {
padding-left: 0.5rem;
}
}
}
/*=== Dropdown */
.dropdown {
.dropdown-target:target + .btn {
background-color: var(--grey-medium-light);
}
}
.dropdown-menu {
margin: 9px 0 0 0;
padding: 0.5rem 0 1rem 0;
background: var(--grey-lighter);
font-size: 1rem;
border: none;
border-radius: 3px;
box-shadow: 0px 6px 8px 0px rgba(0,0,0,0.35);
text-align: left;
&::after {
border: none;
right: 17px;
}
.dropdown-header,
.dropdown-section .dropdown-section-title {
padding: 1rem 1.5rem;
font-weight: bold;
text-align: left;
color: var(--grey-dark);
text-transform: uppercase;
letter-spacing: 1px;
}
.item {
transition: all 0.075s ease-in-out;
& > a,
& > span,
& > .as-link {
padding: 0 2rem;
color: var(--main-font-color);
font-size: inherit;
line-height: 2.5em;
span.icon {
padding: 0 0.25rem !important;
}
}
& > a,
& > .as-link {
&:not(.addItem):hover {
background: var(--main-first);
color: var(--white);
.icon {
filter: grayscale(100%) brightness(2.5);
}
}
}
&.dropdown-section {
margin-top: 0.75rem;
& ~ .dropdown-section {
border-top-color: var(--grey-light);
}
.item {
a, .as-link {
padding-left: 2rem;
}
}
}
&:not(.addItem) {
& > a:hover,
button:hover {
background: var(--main-first);
color: var(--white);
.icon {
filter: brightness(3);
}
}
}
&[aria-checked="true"] {
a::before {
margin: 0 0 0 -14px;
font-weight: bold;
}
}
& ~ .dropdown-header {
margin-top: 0.75rem;
padding-top: 1.75rem;
border-top-color: var(--grey-light);
}
&.separator {
margin-top: 0.75rem;
border-top-color: var(--grey-light);
}
}
.input {
select, input {
margin: 0 auto 5px;
padding: 2px 5px;
border-radius: 3px;
}
}
}
.tree .tree-folder .tree-folder-items .dropdown-menu {
/* to reset the appearance of the dropdown in the case of a dark sidebar */
.item {
padding: 0;
a,
button {
color: var(--main-font-color);
&:hover {
color: var(--white);
}
}
&:hover {
background: var(--main-first);
}
}
}
/*=== Alerts */
.alert {
background: var(--grey-lighter);
color: var(--grey-dark);
font-size: 1rem;
border: 1px solid var(--grey-medium);
border-radius: 3px;
text-shadow: 0 0 1px var(--grey-light);
}
.alert-head {
font-size: 1.15em;
}
.alert > a {
text-decoration: underline;
color: inherit;
}
.alert-warn {
background: var(--warning-light);
color: var(--warning-text);
border: 1px solid color-mix(in srgb, var(--warning-text) 20%, transparent);
}
.alert-success {
background: var(--success-light);
color: var(--success-text);
border: 1px solid color-mix(in srgb, var(--success-text) 20%, transparent);
}
.alert-error {
background: var(--alert-light);
color: var(--alert-text);
border: 1px solid color-mix(in srgb, var(--alert-text) 20%, transparent);
}
/*=== Pagination */
.pagination {
background: var(--grey-light);
color: var(--main-font-color);
.item a {
color: var(--main-font-color);
}
}
/*=== Boxes */
.box {
background: var(--white);
/* border: 1px solid #ddd; */
border: none;
border-radius: 3px;
box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.25);
.box-title {
background: var(--grey-light);
color: var(--main-font-color);
border-radius: 2px 2px 0 0;
}
.box-content {
padding-left: 30px;
.item {
padding: 0.5rem 0;
color: var(--main-font-color);
font-size: 1rem;
border-bottom: 1px solid var(--grey-light);
line-height: 1.7em;
}
.item:last-child {
border-bottom: none;
}
}
.configure {
margin-right: 0.5rem;
padding: 0.25rem;
border-radius: 3px;
.icon {
vertical-align: middle;
}
&:hover {
border-radius: 2px;
background-color: var(--main-first);
.icon {
filter: brightness(3);
}
}
}
}
/*=== "Load more" part */
#bigMarkAsRead.big {
text-align: center;
text-decoration: none;
background: var(--main-first-light);
color: var(--main-first);
transition: all 0.15s ease-in-out;
&:hover {
background: var(--main-first);
color: #fff;
.bigTick {
filter: brightness(7);
}
}
.bigTick {
margin: 0.5rem 0;
background: url(icons/tick-color.svg) center no-repeat;
display: inline-block;
width: 64px;
height: 64px;
text-indent: -9999px;
white-space: nowrap;
}
}