diff options
Diffstat (limited to 'assets/sass/@primer/css/labels/labels.scss')
-rw-r--r-- | assets/sass/@primer/css/labels/labels.scss | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/assets/sass/@primer/css/labels/labels.scss b/assets/sass/@primer/css/labels/labels.scss new file mode 100644 index 0000000..06c799f --- /dev/null +++ b/assets/sass/@primer/css/labels/labels.scss @@ -0,0 +1,68 @@ +// Needs refactoring +// Labels +// +// Use labels to add keyword tags or phrases to issues and pull requests. These +// are used within a list of issues/PRs, on individual issues/PRs, and within +// the select menus that manage them. + +// Provide a wrapper to ensure labels stick together +.labels { + position: relative; +} + +// Each label gets common styles +// .label will be deprecated for .Label +.label, +.Label { + display: inline-block; + // stylelint-disable-next-line primer/spacing + padding: 3px $spacer-1; + font-size: $font-size-small; + font-weight: $font-weight-bold; + line-height: $lh-condensed-ultra; // prevent inheritance from changing proportions + color: $text-white; + // stylelint-disable-next-line primer/borders + border-radius: 2px; + // stylelint-disable-next-line primer/box-shadow + box-shadow: inset 0 -1px 0 rgba($black, 0.12); + + &:hover { + text-decoration: none; + } +} + +// Custom GitHub labels (not for issues/PRs/etc) +// +// Commonly used across the site to indicate a particular role. For example, +// "repo owner" within code comments or role in organizations. +.Label--gray { + color: $text-gray; + // stylelint-disable-next-line primer/colors + background-color: lighten($gray-200, 3%); +} + +.Label--outline { + // stylelint-disable-next-line primer/spacing + margin-top: -1px; // offsets the 1px border + // stylelint-disable-next-line primer/spacing + margin-bottom: -1px; // offsets the 1px border + font-weight: $font-weight-normal; + color: $text-gray; + background-color: transparent; + border: $border-width $border-style $border-black-fade; + box-shadow: none; +} + +.Label--outline-green { + color: $text-green; + border: $border-width $border-style $border-green; +} + +.Label--gray-darker { + // stylelint-disable-next-line primer/colors + background-color: $gray; +} + +.Label--orange { + background-color: $bg-orange; +} |