Skip to content

Instantly share code, notes, and snippets.

@stefanmaric
Last active December 16, 2015 03:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanmaric/a6607f5a165e07bea555 to your computer and use it in GitHub Desktop.
Save stefanmaric/a6607f5a165e07bea555 to your computer and use it in GitHub Desktop.
.btn-pill class in LESS to include with Bootstrap's less files.
// Button styles
// -------------------------
// Pill button variants
.btn.btn-pill {
// border-radius depends on button' height
@border-radius-pill: (@font-size-base * @line-height-base + @padding-base-vertical * 2) / 2;
border-radius: @border-radius-pill;
// different for every button size
&.btn-lg {
@border-radius-pill: (@font-size-large * @line-height-large + @padding-large-vertical * 2) / 2;
border-radius: @border-radius-pill;
}
&.btn-sm {
@border-radius-pill: (@font-size-small * @line-height-small + @padding-small-vertical * 2) / 2;
border-radius: @border-radius-pill;
}
&.btn-xs {
@border-radius-pill: (@font-size-small * @line-height-small + @padding-xs-vertical * 2) / 2;
border-radius: @border-radius-pill;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment