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

Docs: scss-docs unindent automatically the code inside shortcode #38308

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Mar 23, 2023

Description

Count the number of spaces before the first line, then remove all the existing same number of spaces.
/cc @pouwerkerk

Impacts on

Bootstrap PR
https://main--twbs-bootstrap.netlify.app/docs/5.3/components/accordion/#variables https://deploy-preview-38308--twbs-bootstrap.netlify.app/docs/5.3/components/accordion/#variables
https://main--twbs-bootstrap.netlify.app/docs/5.3/content/reboot/#css-variables https://deploy-preview-38308--twbs-bootstrap.netlify.app/docs/5.3/content/reboot/#css-variables
https://main--twbs-bootstrap.netlify.app/docs/5.3/customize/color-modes/#variables https://deploy-preview-38308--twbs-bootstrap.netlify.app/docs/5.3/customize/color-modes/#variables
https://main--twbs-bootstrap.netlify.app/docs/5.3/customize/css-variables/#focus-variables https://deploy-preview-38308--twbs-bootstrap.netlify.app/docs/5.3/customize/css-variables/#focus-variables
https://main--twbs-bootstrap.netlify.app/docs/5.3/utilities/background/#utilities-api https://deploy-preview-38308--twbs-bootstrap.netlify.app/docs/5.3/utilities/background/#utilities-api
https://main--twbs-bootstrap.netlify.app/docs/5.3/utilities/colors/#sass-maps https://deploy-preview-38308--twbs-bootstrap.netlify.app/docs/5.3/utilities/colors/#sass-maps

I think I gathered all the examples types changing in here:

  • Root variables
  • CSS variables
  • Dark maps
  • Utilities API
  • The remaining kind of example should remain the same between the two variants.

Motivation & Context

Remove the indentation of code blocks.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • (NA) I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #35296 by superseding it.
Fixes #34854.

@XhmikosR
Copy link
Member

Now, that's some serious Hugo templating magic 😛

Works pretty well!

@mdo please check it out and we can land it.

@XhmikosR XhmikosR requested a review from mdo March 23, 2023 08:46
@XhmikosR XhmikosR changed the title Docs: scss-docs unindent automatically the code inside Docs: scss-docs unindent automatically the code inside shortcode Mar 23, 2023
@pouwerkerk
Copy link

Nice work!

Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

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

Um, holy shit? Lol, amazing work @louismaximepiton. You're the real MVP. This is so freaking rad. Makes all the difference in the rendering :D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve docs scss-docs shortcode
4 participants