Skip to content

Commit

Permalink
Allow styling of radio button backgrounds (ant-design#5791)
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac authored and ddcat1115 committed Apr 22, 2017
1 parent aa0c29d commit 1790642
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/radio/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
border-style: solid;
border-radius: 14px;
border-color: @border-color-base;
background-color: @component-background;
background-color: @radio-button-bg;
transition: all @radio-duration;
}

Expand Down Expand Up @@ -116,17 +116,17 @@ span.@{radio-prefix-cls} + * {
margin: 0;
height: @input-height-base;
line-height: @input-height-base - 2;
color: @btn-default-color;
color: @radio-button-color;
display: inline-block;
transition: all 0.3s ease;
cursor: pointer;
border: @border-width-base @border-style-base @border-color-base;
border-left: 0;
background: @component-background;
background: @radio-button-bg;
padding: 0 16px;

a {
color: @btn-default-color;
color: @radio-button-color;
}

> .@{radio-prefix-cls}-button {
Expand Down Expand Up @@ -181,7 +181,7 @@ span.@{radio-prefix-cls} + * {
}

&-checked {
background: @component-background;
background: @radio-button-bg;
border-color: @primary-color;
color: @primary-color;
box-shadow: -1px 0 0 0 @primary-color;
Expand Down
4 changes: 4 additions & 0 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@

@btn-group-border : @primary-7;

// Radio buttons
@radio-button-bg : @btn-default-bg;
@radio-button-color : @btn-default-color;

// Media queries breakpoints
// Extra small screen / phone
@screen-xs : 480px;
Expand Down

0 comments on commit 1790642

Please sign in to comment.