diff --git a/src/forms/index.scss b/src/forms/index.scss index 3e740c43..aab50b74 100644 --- a/src/forms/index.scss +++ b/src/forms/index.scss @@ -4,3 +4,4 @@ @import "./form-group.scss"; @import "./form-validation.scss"; @import "./input-group.scss"; +@import "./radio-group.scss"; diff --git a/src/forms/radio-group.scss b/src/forms/radio-group.scss new file mode 100644 index 00000000..0872ba7e --- /dev/null +++ b/src/forms/radio-group.scss @@ -0,0 +1,57 @@ +// Tab like radio group +// +// ``` html +//
+// +// +// +// +//
+// ``` +// Needs refactoring + +.radio-group { + @include clearfix; +} + +.radio-label { + float: left; + // stylelint-disable-next-line primer/variables + padding: $spacer-2 10px $spacer-2 35px; + // stylelint-disable-next-line primer/variables + margin-left: -1px; + color: $text-gray-dark; + cursor: pointer; + border: $border-width $border-style $border-gray-dark; + + :checked + & { + position: relative; + z-index: 1; + // stylelint-disable-next-line primer/variables + border-color: $blue; + } + + .octicon { + // stylelint-disable-next-line primer/variables + padding-right: 5px; + } + + &:first-of-type { + margin-left: 0; + border-top-left-radius: $border-radius; + border-bottom-left-radius: $border-radius; + } + + &:last-of-type { + padding-right: $spacer-3; + border-top-right-radius: $border-radius; + border-bottom-right-radius: $border-radius; + } +} + +.radio-input { + z-index: 3; + float: left; + // stylelint-disable-next-line primer/variables + margin: 14px -35px 0 14px; +}