fix: Use on_surface instead of on_surface_variant if applicable

This commit is contained in:
yoy 2025-10-17 09:17:09 +02:00
parent 9753a3ae9c
commit 0da0ce293b
21 changed files with 24 additions and 24 deletions

View file

@ -52,7 +52,7 @@ export class AttendeeListEditor implements Component<AttendeeListEditorAttrs> {
m(".flex-grow.flex.flex-column.gap-vpad.pb.pt.fit-height", { style: { width: px(attrs.width) } }, [ m(".flex-grow.flex.flex-column.gap-vpad.pb.pt.fit-height", { style: { width: px(attrs.width) } }, [
this.renderOrganizer(attrs.model, organizer), this.renderOrganizer(attrs.model, organizer),
m(".flex.flex-column.gap-vpad-s", [ m(".flex.flex-column.gap-vpad-s", [
m("small.uppercase.b.text-ellipsis", { style: { color: theme.on_surface_variant } }, lang.get("guests_label")), m("small.uppercase.b.text-ellipsis", { style: { color: theme.on_surface } }, lang.get("guests_label")),
whoModel.canModifyGuests ? this.renderGuestsInput(whoModel, attrs.logins, attrs.recipientsSearch) : null, whoModel.canModifyGuests ? this.renderGuestsInput(whoModel, attrs.logins, attrs.recipientsSearch) : null,
this.renderSendUpdateCheckbox(attrs.model.editModels.whoModel), this.renderSendUpdateCheckbox(attrs.model.editModels.whoModel),
this.renderGuestList(attrs, organizer), this.renderGuestList(attrs, organizer),
@ -218,7 +218,7 @@ export class AttendeeListEditor implements Component<AttendeeListEditorAttrs> {
const selected = options.find((option) => option.address === address) ?? options[0] const selected = options.find((option) => option.address === address) ?? options[0]
return m(".flex.col", [ return m(".flex.col", [
m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface_variant } }, lang.get("organizer_label")), m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface } }, lang.get("organizer_label")),
m(Card, { style: { padding: `0` } }, [ m(Card, { style: { padding: `0` } }, [
m(".flex.flex-column", [ m(".flex.flex-column", [
m(".flex.pl-vpad-s.pr-vpad-s", [ m(".flex.pl-vpad-s.pr-vpad-s", [

View file

@ -145,7 +145,7 @@ export class EventEditorDialog {
{ {
height: "100%", height: "100%",
"background-color": theme.surface_container, "background-color": theme.surface_container,
color: theme.on_surface_variant, color: theme.on_surface,
}, },
) )
.addShortcut({ .addShortcut({

View file

@ -96,7 +96,7 @@ export class RepeatRuleEditor implements Component<RepeatRuleEditorAttrs> {
[ [
this.hasUnsupportedRules ? this.renderUnsupportedAdvancedRulesWarning() : null, this.hasUnsupportedRules ? this.renderUnsupportedAdvancedRulesWarning() : null,
m(".flex.col", [ m(".flex.col", [
m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface_variant } }, lang.getTranslationText("frequency_title")), m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface } }, lang.getTranslationText("frequency_title")),
m( m(
Card, Card,
{ {
@ -137,7 +137,7 @@ export class RepeatRuleEditor implements Component<RepeatRuleEditorAttrs> {
} }
return m(".flex.col", [ return m(".flex.col", [
m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface_variant } }, lang.get("calendarRepeatStopCondition_label")), m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface } }, lang.get("calendarRepeatStopCondition_label")),
m( m(
Card, Card,
{ {
@ -169,7 +169,7 @@ export class RepeatRuleEditor implements Component<RepeatRuleEditorAttrs> {
} }
return m(".flex.col", [ return m(".flex.col", [
m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface_variant } }, lang.get("interval_title")), m("small.uppercase.pb-s.b.text-ellipsis", { style: { color: theme.on_surface } }, lang.get("interval_title")),
m( m(
Card, Card,
{ {

View file

@ -144,7 +144,7 @@ const ActionButtons = pureComponent((contact: Contact) => {
} }
const phoneButtonColors = { const phoneButtonColors = {
borderColor: theme.on_surface_variant, borderColor: theme.on_surface_variant,
color: theme.on_surface_variant, color: theme.on_surface,
} }
const singleEmailAdress = contact.mailAddresses.length === 1 const singleEmailAdress = contact.mailAddresses.length === 1

View file

@ -25,7 +25,7 @@ export class SidebarSection implements Component<SidebarSectionAttrs> {
{ {
"data-testid": `section:${lang.getTestId(name)}`, "data-testid": `section:${lang.getTestId(name)}`,
style: { style: {
color: theme.on_surface_variant, color: theme.on_surface,
}, },
}, },
[ [

View file

@ -62,7 +62,7 @@ export class ExpanderButton implements Component<ExpanderAttrs> {
`${a.isBig ? "span" : "small"}`, `${a.isBig ? "span" : "small"}`,
{ {
style: { style: {
color: a.color || theme.on_surface_variant, color: a.color || theme.on_surface,
}, },
}, },
a.isUnformattedLabel ? label : label.toUpperCase(), a.isUnformattedLabel ? label : label.toUpperCase(),

View file

@ -119,7 +119,7 @@ export class NavButton implements Component<NavButtonAttrs> {
href: this._getUrl(a.href), href: this._getUrl(a.href),
style: { style: {
"font-size": a.fontSize ? px(a.fontSize) : "", "font-size": a.fontSize ? px(a.fontSize) : "",
color: this._draggedOver || isNavButtonSelected(a) ? theme.primary : theme.on_surface_variant, color: this._draggedOver || isNavButtonSelected(a) ? theme.primary : theme.on_surface,
...(isCurrent && { background: theme.state_bg_active }), ...(isCurrent && { background: theme.state_bg_active }),
}, },
title: lang.getTranslationText(a.label), title: lang.getTranslationText(a.label),

View file

@ -23,7 +23,7 @@ export class BannerButton implements Component<BannerButtonAttrs> {
class: `border-radius center ${attrs.class} ${attrs.disabled ? "disabled" : ""}`, class: `border-radius center ${attrs.class} ${attrs.disabled ? "disabled" : ""}`,
style: { style: {
border: `2px solid ${attrs.disabled ? theme.on_surface_variant : attrs.borderColor}`, border: `2px solid ${attrs.disabled ? theme.on_surface_variant : attrs.borderColor}`,
color: attrs.disabled ? theme.on_surface_variant : attrs.color, color: attrs.disabled ? theme.on_surface : attrs.color,
padding: px(size.vpad_small), padding: px(size.vpad_small),
minWidth: "60px", minWidth: "60px",
}, },

View file

@ -31,7 +31,7 @@ export class OutlineButton implements ClassComponent<OutlineButtonAttrs> {
disabled: attrs.disabled, disabled: attrs.disabled,
style: { style: {
borderColor: theme.outline, borderColor: theme.outline,
color: theme.on_surface_variant, color: theme.on_surface,
}, },
class: this.resolveClasses(attrs.expanded, attrs.disabled), class: this.resolveClasses(attrs.expanded, attrs.disabled),
} as BaseButtonAttrs) } as BaseButtonAttrs)

View file

@ -25,7 +25,7 @@ export class RowButton implements Component<RowButtonAttrs> {
const attrs = vnode.attrs const attrs = vnode.attrs
const label = lang.getTranslationText(attrs.label) const label = lang.getTranslationText(attrs.label)
const text = lang.getTranslationText(attrs.text ?? attrs.label) const text = lang.getTranslationText(attrs.text ?? attrs.label)
const color = attrs.selected ? theme.primary : theme.on_surface_variant const color = attrs.selected ? theme.primary : theme.on_surface
return m(BaseButton, { return m(BaseButton, {
label: attrs.label, label: attrs.label,
text: m( text: m(

View file

@ -2662,7 +2662,7 @@ styles.registerStyle("main", () => {
".custom-color-container .inputWrapper:before": { ".custom-color-container .inputWrapper:before": {
// slash in content is content alt. so that it's ignored by screen readers // slash in content is content alt. so that it's ignored by screen readers
content: '"#" / ""', content: '"#" / ""',
color: theme.on_surface_variant, color: theme.on_surface,
}, },
".success-container": { ".success-container": {
"background-color": theme.success_container, "background-color": theme.success_container,

View file

@ -8,6 +8,6 @@ export type MenuTitleAttrsType = {
// used in sidebar section title and inside setting view menus // used in sidebar section title and inside setting view menus
export class MenuTitle implements Component<MenuTitleAttrsType> { export class MenuTitle implements Component<MenuTitleAttrsType> {
view({ attrs }: Vnode<MenuTitleAttrsType>): Children { view({ attrs }: Vnode<MenuTitleAttrsType>): Children {
return m("small.uppercase.b", { style: { color: theme.on_surface_variant } }, attrs.content) return m("small.uppercase.b", { style: { color: theme.on_surface } }, attrs.content)
} }
} }

View file

@ -250,7 +250,7 @@ export class BuyOptionBox implements Component<BuyOptionBoxAttr> {
".span.strike.pt-s", ".span.strike.pt-s",
{ {
style: { style: {
color: theme.on_surface_variant, color: theme.on_surface,
fontSize: px(size.font_size_base), fontSize: px(size.font_size_base),
...(!isApplePrice && { "justify-self": "end" }), ...(!isApplePrice && { "justify-self": "end" }),
}, },

View file

@ -83,7 +83,7 @@ class WasThisHelpful implements Component<WasThisHelpfulAttrs> {
view({ attrs: { goToContactSupportPage, goToSolutionWasHelpfulPage, topicName } }: Vnode<WasThisHelpfulAttrs>): Children { view({ attrs: { goToContactSupportPage, goToSolutionWasHelpfulPage, topicName } }: Vnode<WasThisHelpfulAttrs>): Children {
return m( return m(
".flex.flex-column.gap-vpad-s", ".flex.flex-column.gap-vpad-s",
m("small.uppercase.b.text-ellipsis", { style: { color: theme.on_surface_variant } }, lang.get("wasThisHelpful_msg")), m("small.uppercase.b.text-ellipsis", { style: { color: theme.on_surface } }, lang.get("wasThisHelpful_msg")),
m(Card, { shouldDivide: true }, [ m(Card, { shouldDivide: true }, [
m(SectionButton, { m(SectionButton, {
text: "yes_label", text: "yes_label",

View file

@ -148,7 +148,7 @@ export class EventBannerImpl implements ClassComponent<EventBannerImplAttrs> {
class: styles.isSingleColumnLayout() ? "plr-vpad" : "pr-vpad-l pl-vpad-l", class: styles.isSingleColumnLayout() ? "plr-vpad" : "pr-vpad-l pl-vpad-l",
style: { style: {
"background-color": theme.surface_container_high, "background-color": theme.surface_container_high,
color: theme.on_surface_variant, color: theme.on_surface,
}, },
}, },
[ [

View file

@ -31,7 +31,7 @@ export class CollapsedMailView implements Component<CollapsedMailViewAttrs> {
"aria-expanded": "false", "aria-expanded": "false",
"data-testid": "collapsed-mail-view", "data-testid": "collapsed-mail-view",
style: { style: {
color: theme.on_surface_variant, color: theme.on_surface,
}, },
onclick: () => viewModel.expandMail(Promise.resolve()), onclick: () => viewModel.expandMail(Promise.resolve()),
onkeyup: (e: KeyboardEvent) => { onkeyup: (e: KeyboardEvent) => {

View file

@ -193,7 +193,7 @@ export class ConversationViewer implements Component<ConversationViewerAttrs> {
".font-weight-600.center.mt-l" + "." + responsiveCardHMargin(), ".font-weight-600.center.mt-l" + "." + responsiveCardHMargin(),
{ {
style: { style: {
color: theme.on_surface_variant, color: theme.on_surface,
}, },
}, },
lang.get("loading_msg"), lang.get("loading_msg"),

View file

@ -73,7 +73,7 @@ export class LabelsPopup implements ModalComponent {
.sort((labelA, labelB) => labelA.label.name.localeCompare(labelB.label.name)) .sort((labelA, labelB) => labelA.label.name.localeCompare(labelB.label.name))
.map((labelState) => { .map((labelState) => {
const { label, state } = labelState const { label, state } = labelState
const color = theme.on_surface_variant const color = theme.on_surface
const canToggleLabel = state === LabelState.Applied || state === LabelState.AppliedToSome || !this.isMaxLabelsReached const canToggleLabel = state === LabelState.Applied || state === LabelState.AppliedToSome || !this.isMaxLabelsReached
const opacity = !canToggleLabel ? 0.5 : undefined const opacity = !canToggleLabel ? 0.5 : undefined

View file

@ -348,7 +348,7 @@ export class MailRow implements VirtualRow<Mail> {
style: { style: {
// in dark theme override saturation to aid readability. This is not relative but absolute saturation. We preserve the hue. // in dark theme override saturation to aid readability. This is not relative but absolute saturation. We preserve the hue.
border: `2px solid ${getLabelColor(theme.on_surface_variant)}`, border: `2px solid ${getLabelColor(theme.on_surface_variant)}`,
color: getLabelColor(theme.on_surface_variant), color: getLabelColor(theme.on_surface),
padding: `0px ${size.vpad_xsm}px 1px`, padding: `0px ${size.vpad_xsm}px 1px`,
marginRight: px(size.vpad_xsm), marginRight: px(size.vpad_xsm),
minWidth: px(16), minWidth: px(16),

View file

@ -189,7 +189,7 @@ export class MailViewerHeader implements Component<MailViewerHeaderAttrs> {
}, },
hoverText: folderInfo.name, hoverText: folderInfo.name,
}), }),
m(".small.font-weight-600.selectable.no-wrap", { style: { color: theme.on_surface_variant } }, [ m(".small.font-weight-600.selectable.no-wrap", { style: { color: theme.on_surface } }, [
m(".noprint", dateTime), // show the short date when viewing m(".noprint", dateTime), // show the short date when viewing
m(".noscreen", dateTimeFull), // show the date with year when printing m(".noscreen", dateTimeFull), // show the date with year when printing
]), ]),

View file

@ -799,7 +799,7 @@ export class SettingsView extends BaseTopLevelView implements TopLevelView<Setti
style: { style: {
marginInline: "auto", marginInline: "auto",
border: `1px solid ${theme.on_surface_variant}`, border: `1px solid ${theme.on_surface_variant}`,
color: theme.on_surface_variant, color: theme.on_surface,
}, },
label: "supportMenu_label", label: "supportMenu_label",
text: m(".pl-s", lang.getTranslation("supportMenu_label").text), text: m(".pl-s", lang.getTranslation("supportMenu_label").text),