From b29aafcaf339097c3bafd4a5ef7acc086ea877fb Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 4 Nov 2024 14:15:39 -0700 Subject: [PATCH] Remove border from buttons without labels for fancy theme Needed some parts exposed. --- api/js/etemplate/Et2Button/Et2Button.ts | 2 +- api/js/etemplate/Et2Link/Et2LinkTo.ts | 4 ++++ api/js/etemplate/Et2Vfs/Et2VfsSelectButton.ts | 1 + api/js/etemplate/et2_widget_file.ts | 5 ++++- pixelegg/css/fancy.css | 20 +++++++++++++++++++ pixelegg/css/fancy.less | 7 +++++++ 6 files changed, 37 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Button/Et2Button.ts b/api/js/etemplate/Et2Button/Et2Button.ts index ad4971a66a..8db8cf2a4e 100644 --- a/api/js/etemplate/Et2Button/Et2Button.ts +++ b/api/js/etemplate/Et2Button/Et2Button.ts @@ -22,7 +22,7 @@ export class Et2Button extends ButtonMixin(Et2InputWidget(SlButton)) { return { ...super.properties, - label: {type: String, noAccessor: true} + label: {type: String, noAccessor: true, reflect: true} } } diff --git a/api/js/etemplate/Et2Link/Et2LinkTo.ts b/api/js/etemplate/Et2Link/Et2LinkTo.ts index 26a6754f9f..35029e235a 100644 --- a/api/js/etemplate/Et2Link/Et2LinkTo.ts +++ b/api/js/etemplate/Et2Link/Et2LinkTo.ts @@ -163,6 +163,8 @@ export class Et2LinkTo extends Et2InputWidget(LitElement) return html` et2-image[class*="clock"] { --et2-button-image-padding-left: 0.2rem; } +:root et2-button:not([label])::part(base), +:host et2-button:not([label])::part(base), +.sl-theme-light et2-button:not([label])::part(base), +.sl-theme-dark et2-button:not([label])::part(base), +:root et2-button-timestamp::part(base), +:host et2-button-timestamp::part(base), +.sl-theme-light et2-button-timestamp::part(base), +.sl-theme-dark et2-button-timestamp::part(base) { + --sl-input-border-color: transparent; +} +:root et2-vfs-select::part(base), +:host et2-vfs-select::part(base), +.sl-theme-light et2-vfs-select::part(base), +.sl-theme-dark et2-vfs-select::part(base), +:root et2-link-to::part(button_base), +:host et2-link-to::part(button_base), +.sl-theme-light et2-link-to::part(button_base), +.sl-theme-dark et2-link-to::part(button_base) { + --sl-input-border-color: transparent; +} :root et2-tabbox, :host et2-tabbox, .sl-theme-light et2-tabbox, diff --git a/pixelegg/css/fancy.less b/pixelegg/css/fancy.less index ceac92145e..8c1d88a150 100644 --- a/pixelegg/css/fancy.less +++ b/pixelegg/css/fancy.less @@ -19,6 +19,13 @@ --et2-button-image-padding-left: .2rem; } + et2-button:not([label])::part(base), et2-button-timestamp::part(base) { + --sl-input-border-color: transparent; + } + et2-vfs-select::part(base), et2-link-to::part(button_base) { + --sl-input-border-color: transparent; + } + et2-tabbox { --track-width: 0px;