Skip to content
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

fix(callout): default callout size #2779

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

fix(callout): default callout size #2779

wants to merge 1 commit into from

Conversation

shajz
Copy link
Contributor

@shajz shajz commented May 7, 2024

Description

Callout says it defaults to 'M' but it doesn't.


@LuccaIntegration
Copy link

@shajz shajz added the 🔖🐛 FIX Bug / Visual fix (PR should target Master branch) label May 7, 2024
@CCNET-iLucca
Copy link

Tests d'interfaces

@Supamiu
Copy link
Contributor

Supamiu commented May 13, 2024

While the size doesn't explicitly default to 'M', it technically does, and shouldn't be enforced explicitly.

Imagine something like a larger LF component which also has sizing, using lu-callout internally, a quick structure could be:

<div class="something-component">
...content
<lu-callout></lu-callout>
</div>

And in SCSS:

.something-component {
 .callout {
    @include S;
 }
}

Having an explicit default size would render this impossible because having a size = 'M' means we'd have the mod-M class on the callout which would force the size dans make SCSS size manipulation impossible.

Ping @vvalentin-lucca for more details if needed.

@shajz
Copy link
Contributor Author

shajz commented May 13, 2024

I don't understand how this is supposed to work. There's a mod-{{size}} class on the component, so if size is undefined, the resulting class is mod-? Shouldn't we use [ngClass] then?

@vvalentin-lucca
Copy link
Contributor

By default, the size of components is set to M, but this is not explicit, allowing you to inherit a size set higher by an enclosing component.

  • So if a button (default size M) is in a callout of size S, it will automatically change to size S.
  • Inversely, a button explicitly set to size M, even in a callout of size S, will remain in size M.

@Supamiu
Copy link
Contributor

Supamiu commented May 13, 2024

We should indeed use [ngClass] to avoid having mod-undefined

@jeremie-lucca jeremie-lucca added this to the 17.5 milestone May 17, 2024
@jeremie-lucca jeremie-lucca removed this from the 18.1 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖🐛 FIX Bug / Visual fix (PR should target Master branch)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants