bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Improve docs scss-docs shortcode

Open XhmikosR opened this issue 3 years ago • 8 comments

scss-docs: un-indent these lines if possible. Right now the snippet brings in those extra spaces

For example in https://getbootstrap.com/docs/5.1/utilities/colors/#utilities-api

XhmikosR avatar Aug 31 '21 14:08 XhmikosR

The indentations are being generated from the spaces found in _utilities.scss file which is following the style coding standard. We can separate the styles for each components in _utilities.scss and merge them separately, so that there will be no leading indentation in the beginning. What do you think? @XhmikosR

// scss-docs-start utils-color
$utilities: map-merge(
  (
    "color": (
      property: color,
      class: text,
      local-vars: (
        "text-opacity": 1
      ),
      values: map-merge(
        $utilities-text-colors,
        (
          "muted": $text-muted,
          "black-50": rgba($black, .5), // deprecated
          "white-50": rgba($white, .5), // deprecated
          "reset": inherit,
        )
      )
    ),
    "text-opacity": (
      css-var: true,
      class: text-opacity,
      values: (
        25: .25,
        50: .5,
        75: .75,
        100: 1
      )
    ),
  ), 
  $utilities
);
// scss-docs-end utils-color

haweecodes avatar Sep 09 '21 08:09 haweecodes

I don't think we are looking at separating those due to this issue. There are probably more cases, so this should be handled in the shortcode.

Again, this is not a huge issue, but it'd be nice to sort it out eventually :)

XhmikosR avatar Oct 01 '21 05:10 XhmikosR

👆 Helped along a fellow contributor by rebasing latest from main into his stale branch and then verifying it locally - hope this helps 🙏 cheers

https://github.com/twbs/bootstrap/pull/35879 credit where due to @pouwerkerk 🙌

gdibble avatar Feb 22 '22 07:02 gdibble

@XhmikosR if the other pr was out of date, I thought pulling latest and rechecking would help everyone and get the docs updated faster. Did not mean to be rude or step on any toes. Anyway no worries; take care.

gdibble avatar Feb 22 '22 08:02 gdibble

It's just that this just increases the noise for us. We can update most PRs or ask the person who opened the PR to update it.

If you want to help out, you could check the open issues with the label help-wanted.

XhmikosR avatar Feb 22 '22 08:02 XhmikosR

@gdibble no worries. Your PR reminded me it's been a while since I fetched/rebased my PR.

I've gone ahead and done that now. I'm usually able to respond quickly if you need me to make changes/update when you or someone on the bootstrap core team is ready to review, just let me know. Thanks!

pouwerkerk avatar Feb 22 '22 08:02 pouwerkerk

(: Yeah of course @XhmikosR. Found by help-wanted. PR was idle 3 months so I wondered about @pouwerkerk, as I know how things and life goes. Anyway was just being helpful. Have a great day all ✌️

gdibble avatar Feb 22 '22 14:02 gdibble

Hello! I would like to contribute to this as it is still open. Please let me know

sdkdeepa avatar Aug 28 '22 23:08 sdkdeepa