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

On the flex-grow page, the result section of the last example is showing wrong #9190

Closed
duandzgp opened this issue Jun 28, 2023 · 2 comments · Fixed by #9203
Closed

On the flex-grow page, the result section of the last example is showing wrong #9190

duandzgp opened this issue Jun 28, 2023 · 2 comments · Fixed by #9203
Assignees
Labels
has PR Issues that already have a PR p1 We will address this soon and will provide capacity from our team for it in the next few releases.

Comments

@duandzgp
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow

What specific section or headline is this issue about?

Result (#result)

What information was incorrect, unhelpful, or incomplete?

The #content should be applied display: flex property, but it is not. Because there are some broken styles before its style block

/* These styles below are broken */
background-color:red;
background-color:lightblue;
background-color:yellow;
background-color:brown;
background-color:lightgreen;
background-color:brown;
#content {
  display: flex;

  justify-content: space-around;
  flex-flow: row wrap;
  align-items: stretch;
}

What did you expect to see?

The #content should be applied display: flex property.

Btw, I think we should use class instead of id for the content element. Because using the ID is an anti-pattern. It's fine in the example but folks likely use the example as the standard. I remember in the early stage of my career, I usually considered code from MDN and some other sites as good practice and followed blindly.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

I would like to fix this issue but I can't find where is the snippet code.

MDN metadata

Page report details
@duandzgp duandzgp added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 28, 2023
@Josh-Cena
Copy link
Member

Those styles are inline styles and shouldn't be extracted as CSS. cc @mdn/core-dev is this a Yari problem?

@LeoMcA LeoMcA transferred this issue from mdn/content Jun 28, 2023
@LeoMcA LeoMcA added p1 We will address this soon and will provide capacity from our team for it in the next few releases. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 28, 2023
@LeoMcA
Copy link
Member

LeoMcA commented Jun 28, 2023

is this a Yari problem?

Yep looks like it, I've transferred the issue. We'll hopefully be able to fix early next week.

@LeoMcA LeoMcA self-assigned this Jun 30, 2023
LeoMcA added a commit that referenced this issue Jun 30, 2023
https://mozilla-hub.atlassian.net/browse/MP-515
#9190

inline bits of css get a `css` class applied to them, so our extraction
logic was treating them as "normal" css - which of course it isn't,
since it doesn't have any kind of selector
@caugner caugner added the has PR Issues that already have a PR label Jul 3, 2023
fiji-flo added a commit that referenced this issue Jul 6, 2023
* fix(playground): don't extract inline css

https://mozilla-hub.atlassian.net/browse/MP-515
#9190

inline bits of css get a `css` class applied to them, so our extraction
logic was treating them as "normal" css - which of course it isn't,
since it doesn't have any kind of selector

* remove redundant selectors

---------

Co-authored-by: Florian Dieminger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR Issues that already have a PR p1 We will address this soon and will provide capacity from our team for it in the next few releases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants