Skip to content

Conversation

@mfranzke
Copy link
Collaborator

@mfranzke mfranzke commented Aug 6, 2025

Proposed changes

Currently we've checked for the elements to be either input or textarea at the CSS level with :is(). Instead as we're using those in a SCSS mixin, we should that for check for those element types in a SCSS condition.

The main purpose of this is to prevent resulting selectors like .db-input input:is(input,textarea):not(:disabled):read-only, which becomes .db-input input:not(:disabled):read-only

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

@mfranzke mfranzke self-assigned this Aug 6, 2025
@mfranzke mfranzke requested a review from nmerget as a code owner August 6, 2025 13:46
@mfranzke mfranzke added the 🍄🆙improvement New feature or request label Aug 6, 2025
@mfranzke mfranzke moved this to 👀 In review in UX Engineering Team Backlog Aug 6, 2025
@mfranzke mfranzke removed their assignment Aug 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mfranzke mfranzke changed the title refactor: css condition to scss condition refactor: CSS "condition" to SCSS condition Aug 6, 2025
@mfranzke mfranzke enabled auto-merge (squash) August 6, 2025 14:38
mfranzke and others added 2 commits August 6, 2025 16:39
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This refactoring moves CSS element type checking from runtime CSS :is() selectors to build-time SCSS conditions, improving maintainability and performance by reducing CSS complexity. The change replaces CSS pseudo-selectors with SCSS conditional compilation.

  • Replaced CSS :is(input, textarea) selectors with SCSS @if conditions using list.index()
  • Added SCSS variables to define valid form field types for read-only and field-sizing properties
  • Updated CSS variable naming to be dynamic based on the element type

@mfranzke mfranzke merged commit 2be9529 into main Aug 12, 2025
53 checks passed
@mfranzke mfranzke deleted the refactor-css-condition-to-scss-condition branch August 12, 2025 14:42
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in UX Engineering Team Backlog Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍄🆙improvement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants