mirror of
https://github.com/yldio/copilot.git
synced 2024-11-10 21:30:06 +02:00
Radio Input - Refactoring CSS
This commit is contained in:
parent
3a983b10a5
commit
e76ca342c6
11
ui/.postcss.js
Normal file
11
ui/.postcss.js
Normal file
@ -0,0 +1,11 @@
|
||||
var calc = require('postcss-calc');
|
||||
|
||||
module.exports = function (postcss) {
|
||||
return postcss([
|
||||
require('postcss-at-rules-variables')(),
|
||||
require('postcss-modules-values'),
|
||||
require('postcss-mixins')(),
|
||||
require('postcss-for'),
|
||||
require('postcss-cssnext')(),
|
||||
])
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
# `<Radio>`
|
||||
# `<Radio >`
|
||||
|
||||
## demo
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
:root {
|
||||
--radio-radius: 20px;
|
||||
--radio-border-size: calc( var(--radio-radius) / 4 );
|
||||
--dot-color: #646464;
|
||||
--border-color: #cfd1d1;
|
||||
}
|
||||
@ -18,7 +19,7 @@
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
border : calc( var(--radio-radius) / 4 ) solid white;
|
||||
border : var(--radio-border-size) solid white;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 1px var(--border-color);
|
||||
display: inline-block;
|
||||
@ -38,12 +39,6 @@
|
||||
&:checked {
|
||||
& ~ span:before {
|
||||
background: var(--dot-color);
|
||||
border : calc( var(--radio-radius) / 4 ) solid white;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 1px var(--border-color);
|
||||
height: var(--radio-radius);
|
||||
position: absolute;
|
||||
width: var(--radio-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user