Skip to content

Commit

Permalink
radio button css import
Browse files Browse the repository at this point in the history
  • Loading branch information
jnomad21 committed Nov 14, 2023
1 parent a018f78 commit b315f51
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 53 deletions.
4 changes: 4 additions & 0 deletions docs/components/sass/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ $button-hovercolor: $color-darkgreen;

$radio-color: $color-green;
$radio-hovercolor: $color-darkgreen;
$radio-disabled: #c6c6c6;
$radio-button-width: 26px;

$dropdown-hover-color: #CFE1E4;
$dropdown-select-color: #A0C4C9;
Expand All @@ -43,6 +45,8 @@ $tab-hover-color: $color-darkgreen;





/// Breakpoints map
/// @prop {String} keys - Keys are identifiers mapped to a given length
/// @prop {Map} values - Values are actual breakpoints expressed in pixels
Expand Down
17 changes: 10 additions & 7 deletions docs/components/sass/components/_radio.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
// --8<-- [start:unchecked]
input[type="radio"]{
border:.5px solid $radio-color;
border-radius: 50%;
width: 26px;
width: $radio-button-width;
margin-right: 5px;
accent-color: red;
appearance: none;
-webkit-appearance: none;


&:disabled {
background: #c6c6c6;
background-color: $radio-disabled;
}
&.hover{
&.hover,
:hover{
opacity: .3;
}

}
// --8<-- [end:unchecked]

// --8<-- [start:checked]
input[type="radio"]:checked {
width: 26px;

margin-right: 5px;
accent-color: $radio-color;
background-color: $radio-color;
Expand All @@ -28,14 +31,14 @@ input[type="radio"]:checked {

&.disabled,
:disabled{
accent-color: #6f6f6f;
background-color: $radio-disabled;
}
&.hover,
:hover{
opacity: .3;
}

}

// --8<-- [end:checked]


9 changes: 4 additions & 5 deletions docs/components/sass/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,19 @@ input[type=radio] {
border-radius: 50%;
width: 26px;
margin-right: 5px;
accent-color: red;
-moz-appearance: none;
appearance: none;
-webkit-appearance: none;
}
input[type=radio]:disabled {
background: #c6c6c6;
background-color: #c6c6c6;
}
input[type=radio].hover {
input[type=radio].hover,
input[type=radio] :hover {
opacity: 0.3;
}

input[type=radio]:checked {
width: 26px;
margin-right: 5px;
accent-color: #247984;
background-color: #247984;
Expand All @@ -181,7 +180,7 @@ input[type=radio]:checked {
}
input[type=radio]:checked.disabled,
input[type=radio]:checked :disabled {
accent-color: #6f6f6f;
background-color: #c6c6c6;
}
input[type=radio]:checked.hover,
input[type=radio]:checked :hover {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/sass/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 3 additions & 40 deletions docs/radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,8 @@ hide:
=== "CSS"

``` css

.btn-sm{
background-color: #247984;
height: 40px;
border-radius: 20px;
padding: 0px 32px;
color: white;
line-height: 40px;
width: fit-content;
}

.btn .hover{
background: #0D5761;
}
.btn .focused{
border-color: #0D5761;
outline-color: #0D5761;
}
.btn .disabled{
background: #c6c6c6;
}
--8<-- "_radio.scss:unchecked"
```
=== "Button Selected"
Expand Down Expand Up @@ -124,24 +105,6 @@ hide:

``` css

.btn-md{
background-color: #247984;
height: 60px;
border-radius: 60px;
padding: 0px 50px;
line-height: 60px;
width: fit-content;
}

.btn .hover{
background: #0D5761;
}
.btn .focus{
border-color: #0D5761;
outline-color: #0D5761;
}
.btn .disabled{
background: #c6c6c6;
}
--8<-- "_radio.scss:checked"
```

0 comments on commit b315f51

Please sign in to comment.