Skip to content

fix(field-group): update styles to latest; reduce system theming - abandoned #5293

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions .changeset/cruel-hotels-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@spectrum-web-components/field-group': patch
'@spectrum-web-components/styles': patch
---

Remove unnecessary system theme references to reduce complexity for components that don't need the additional mapping layer.
5 changes: 0 additions & 5 deletions packages/field-group/src/field-group-overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

:host {
--spectrum-fieldgroup-margin: var(--system-field-group-margin);
--spectrum-fieldgroup-readonly-delimiter: var(--system-field-group-readonly-delimiter);
}
12 changes: 2 additions & 10 deletions packages/field-group/src/field-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,8 @@
*/

@import url("./spectrum-field-group.css");
@import url("./field-group-overrides.css");

:host([horizontal][dir="rtl"]) slot:not([name])::slotted(*:not(:last-child)),
:host([dir="rtl"]:not([vertical])) slot:not([name])::slotted(*:not(:last-child)) {
:host(:not([vertical])) .group {
/* .spectrum-FieldGroup--horizontal .spectrum-FieldGroup-item+.spectrum-FieldGroup-item */
margin: 0 0 0 var(--spectrum-fieldgroup-margin);
}

:host([horizontal][dir="ltr"]) slot:not([name])::slotted(*:not(:last-child)),
:host([dir="ltr"]:not([vertical])) slot:not([name])::slotted(*:not(:last-child)) {
/* .spectrum-FieldGroup--horizontal .spectrum-FieldGroup-item+.spectrum-FieldGroup-item */
margin: 0 var(--spectrum-fieldgroup-margin) 0 0;
gap: var(--spectrum-spacing-300);
}
2 changes: 1 addition & 1 deletion packages/field-group/src/spectrum-field-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}

:host([horizontal]) .group slot:not([name])::slotted(:not(:last-child)) {
margin-inline-end: var(--spectrum-fieldgroup-margin);
margin-inline-end: var(--spectrum-spacing-300);
}

:host([horizontal]) .group .spectrum-HelpText {
Expand Down
2 changes: 0 additions & 2 deletions tools/styles/tokens-v2/system-theme-bridge.css
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,6 @@
--system-divider-background-color-static-white: var(--spectrum-transparent-white-200);
--system-divider-background-color-static-black: var(--spectrum-transparent-black-200);
--system-drop-zone-border-color: var(--spectrum-gray-200);
--system-field-group-margin: var(--spectrum-spacing-300);
--system-field-group-readonly-delimiter: ",";
--system-infield-button-border-width: var(--spectrum-border-width-100);
--system-infield-button-border-color: inherit;
--system-infield-button-border-radius: var(--spectrum-corner-radius-100);
Expand Down
2 changes: 0 additions & 2 deletions tools/styles/tokens/express/system-theme-bridge.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@
--system-divider-background-color-static-white: var(--spectrum-transparent-white-300);
--system-divider-background-color-static-black: var(--spectrum-transparent-black-300);
--system-drop-zone-border-color: var(--spectrum-gray-300);
--system-field-group-margin: var(--spectrum-spacing-300);
--system-field-group-readonly-delimiter: ",";
--system-infield-button-border-width: 0;
--system-infield-button-border-color: transparent;
--system-infield-button-border-radius: var(--spectrum-corner-radius-75);
Expand Down
2 changes: 0 additions & 2 deletions tools/styles/tokens/spectrum/system-theme-bridge.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,6 @@
--system-divider-background-color-static-white: var(--spectrum-transparent-white-300);
--system-divider-background-color-static-black: var(--spectrum-transparent-black-300);
--system-drop-zone-border-color: var(--spectrum-gray-300);
--system-field-group-margin: var(--spectrum-spacing-300);
--system-field-group-readonly-delimiter: ",";
--system-infield-button-border-width: var(--spectrum-border-width-100);
--system-infield-button-border-color: inherit;
--system-infield-button-border-radius: var(--spectrum-corner-radius-100);
Expand Down
Loading