Skip to content

Fluent-next: CardView sizes stop repeating themselves between default and compact - #35249

Merged
EugeniyKiyashko merged 2 commits into
feature/26_2_new_fluent_theme_with_design_tokensfrom
fluent-next/cardview-size-dedup
Sep 17, 2026
Merged

EugeniyKiyashko merged 2 commits into
feature/26_2_new_fluent_theme_with_design_tokensfrom
fluent-next/cardview-size-dedup

Conversation

@EugeniyKiyashko

Copy link
Copy Markdown
Contributor

No description provided.

… and compact

21 variables in cardView/_sizes.scss were declared twice with the same value, once
per size branch, though none of them depends on the size: token references, three
literals and the var() names that read a sibling. fluent, material and generic
declare the same 21 once, outside the branches; this brings fluent-next to the
same shape. For a future large mode it is 21 values that will not have to be
written a third time.

Each value moves into the `null !default` pre-declaration the file already has at
the top, and both branch lines go. The marker comments travel with the value - the
px gate reads them. $card-view-header-panel-item-icon-size moves too: its
$global-icon-size comes as a module from ../sizes and is resolved before this file,
which is why legacy declares it at the top as well. 403 lines to 361.

The values were taken from the file rather than retyped: the two branch lines were
compared character for character first, and nothing moved where they differed.

Byte-identical, and checked as such: light, light.compact and dark compare clean
against a build made before the edit. tools/review/size-branch-dups.mjs now reports
identical: 0 and identical-but-depends: 0 for fluent-next, matching the three
legacy themes. _public.scss is untouched - the published set is the same.
@EugeniyKiyashko EugeniyKiyashko self-assigned this Sep 16, 2026
The 21 variables took their groups with them, and the section comments stayed
behind heading nothing: Card - selected, Header panel item - hovered, Header
panel item - disabled, Filter panel, Search highlight, in both branches.

The comment scheme itself is not redundant - fluent carries the same headings in
the same words, and the top of this file groups everything a second time by
#region. What fluent does not carry is an empty one: a heading there exists only
where a variable follows it. With these ten lines gone the two files list the
same headings in the same order, plus Column chooser, which legacy has no
equivalent for.

Still byte-identical: all three bundles compare clean against the pre-edit build.
@EugeniyKiyashko
EugeniyKiyashko merged commit 8bddca9 into feature/26_2_new_fluent_theme_with_design_tokens Sep 17, 2026
210 of 211 checks passed
@EugeniyKiyashko
EugeniyKiyashko deleted the fluent-next/cardview-size-dedup branch September 17, 2026 07:33
pharret31 pushed a commit that referenced this pull request Sep 18, 2026
pharret31 pushed a commit that referenced this pull request Sep 21, 2026
pharret31 pushed a commit that referenced this pull request Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants