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

chore(css): Move CSS examples - Learn CSS, How To, Flexbox basics #36661

Merged
merged 14 commits into from
Nov 6, 2024

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Nov 5, 2024

Description

As part of an initiative to reduce repo maintenance & code duplication, this PR moves some external examples into content. This PR converts the following macros to live samples:

{{EmbedGHLiveSample("css-examples/learn/getting-started/started1.html", '100%', 900)}}
{{EmbedGHLiveSample("css-examples/learn/getting-started/started2.html", '100%', 1100)}}
{{EmbedGHLiveSample("css-examples/learn/getting-started/started3.html", '100%', 1000)}}
{{EmbedGHLiveSample("css-examples/learn/getting-started/experiment-sandbox.html", '100%', 800)}}
{{EmbedGHLiveSample("css-examples/learn/getting-started/biog.html", '100%', 1600)}}
{{EmbedGHLiveSample("css-examples/howto/box-shadow-button.html", '100%', 500)}}
{{EmbedGHLiveSample("css-examples/howto/text-shadow.html", '100%', 500)}}
{{EmbedGHLiveSample("css-examples/howto/center.html", '100%', 700)}}
{{EmbedGHLiveSample("css-examples/howto/object-fit.html", '100%', 800)}}
{{EmbedGHLiveSample("css-examples/howto/highlight_first_line.html", '100%', 750)}}
{{EmbedGHLiveSample("css-examples/howto/highlight_first_line2.html", '100%', 700)}}
{{EmbedGHLiveSample("css-examples/howto/highlight_first_para.html", '100%', 770)}}
{{EmbedGHLiveSample("css-examples/howto/highlight_h1_plus_para.html", '100%', 800)}}
{{EmbedGHLiveSample("css-examples/howto/opacity.html", '100%', 770)}}
{{EmbedGHLiveSample("css-examples/howto/transition-button.html", '100%', 720)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/the-flex-container.html", '100%', 480)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/flex-direction.html", '100%', 350)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/flex-wrap.html", '100%', 400)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/flex-flow.html", '100%', 400)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/flex-properties.html", '100%', 510)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/flex-shorthands.html", '100%', 510)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/align-items.html", '100%', 520)}}
{{EmbedGHLiveSample("css-examples/flexbox/basics/justify-content.html", '100%', 380)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/min-max-content.html", '100%', 750)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/flex-basis.html", '100%', 500)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/flex-grow.html", '100%', 520)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/flex-grow-ratios.html", '100%', 520)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/flex-shrink.html", '100%', 500)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/flex-shrink-min-content.html", '100%', 500)}}
{{EmbedGHLiveSample("css-examples/flexbox/ratios/flex-shrink-ratios.html", '100%', 570)}}

Motivation

Motivation is described in the project issue.

Related issues and pull requests

@bsmth bsmth requested a review from a team as a code owner November 5, 2024 12:50
@bsmth bsmth requested review from chrisdavidmills and removed request for a team November 5, 2024 12:50
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:Learn:CSS Learning area CSS docs size/l [PR only] 501-1000 LoC changed labels Nov 5, 2024
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

I have looked at each one of these, and they look good, very nice work @bsmth!

I will now merge this and try pulling it into my giant PR to see if any conflicts occur.

@chrisdavidmills chrisdavidmills merged commit 4059070 into mdn:main Nov 6, 2024
7 checks passed
@bsmth bsmth deleted the css-examples-getting-started branch November 6, 2024 15:50
@bsmth
Copy link
Member Author

bsmth commented Nov 6, 2024

I have looked at each one of these, and they look good, very nice work @bsmth!

I will now merge this and try pulling it into my giant PR to see if any conflicts occur.

Super, thank you very much!

@@ -184,8 +196,8 @@ Each CSS rule starts with a selector — or a list of selectors — in order to
```css
h1
a:link
.many-things
#one-thing
.manythings
Copy link
Member Author

Choose a reason for hiding this comment

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

whoops, these two slipped in (broken on this branch, fixed on main), I'll correct in my next PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 9aad0db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs Content:Learn:CSS Learning area CSS docs size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants