Skip to content

Commit

Permalink
docs(fab): make some sass docs inline
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 558201462
  • Loading branch information
AndrewJakubowicz authored and copybara-github committed Aug 18, 2023
1 parent 33803ab commit aa0f4b7
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions fab/internal/_fab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,15 @@
}
}

/*
* The default content is needed because we do a bit of trickery. If there is
* no slotted icon we need to have `padding-inline: 20px` but if there is, we
* need padding-inline: 16px 20px.
*
* So what this approach does is make the margin / padding-inline of the outer
* button `padding-inline: 16px 20px`, so if there is something slotted, it
* renders correctly. This default content span then fills the extra `4px`
* inline spacing if nothing is slotted which effectively makes the button's
* inlne spacing `20px/20px`.
*/
// The default content is needed because we do a bit of trickery. If there is
// no slotted icon we need to have `padding-inline: 20px` but if there is, we
// need `padding-inline: 16px 20px`.
//
// So what this approach does is make the margin / padding-inline of the outer
// button `padding-inline: 16px 20px`, so if there is something slotted, it
// renders correctly. This default content span then fills the extra `4px`
// inline spacing if nothing is slotted which effectively makes the button's
// inline spacing `20px/20px`.
.fab.extended slot span {
padding-inline-start: 4px;
}
Expand Down

0 comments on commit aa0f4b7

Please sign in to comment.