Skip to content

Commit

Permalink
radiocheck css-only style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
elclanrs committed Oct 9, 2013
1 parent 916d8b7 commit cfda56b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -780,7 +780,8 @@ icon = true // disable icons (must disable in plugin options too)
icon-size = 16px // must be square icon
icon-padding = 8px // padding between icon, input and error
radiocheck-sprite = true // `false` for css only style, no sprite (IE9 buggy)
radiocheck-sprite = false // `true` to use sprite
radiocheck-size = 18px // size for css-only radiocheck
group-horizontal = false // group checkbox and radio horizontally
```
Expand Down
2 changes: 1 addition & 1 deletion css/jquery.idealforms.css

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

30 changes: 19 additions & 11 deletions styl/idealradiocheck.styl
Expand Up @@ -5,7 +5,7 @@ form.idealforms

.ideal-radiocheck-label
display: inline-block
margin: .1em 0 !important
padding: .25em 0 !important
cursor: pointer

if group-horizontal
Expand Down Expand Up @@ -50,10 +50,10 @@ form.idealforms
position: relative
float: left
margin-right: 10px !important
width: 18px
height: 18px
width: radiocheck-size
height: radiocheck-size
background: linear-gradient(white, #eee)
border: 1px solid #bbb
border: 1px solid #aaa
border-radius: 4px
box-shadow: 0 1px 1px rgba(black, .2)
&:after
Expand All @@ -68,20 +68,28 @@ form.idealforms

.ideal-check:after, .ideal-radio:after
content: "×"
font-family: Arial, sans-serif
position: absolute
left: 50%
height: 18px
width: 18px
line-height: 18px
margin-left: -9px
width: radiocheck-size
margin-left: -(radiocheck-size/2)
line-height: radiocheck-size
text-align: center
font-size: 20px
font-size: radiocheck-size
color: #888
text-shadow: 1px 1px 0 white

.ideal-radio:after
content: "•"
font-size: 22px
size = (radiocheck-size/4)
content: ""
height: size
width: size
top: 50%
left: 50%
margin-top: -(size/2)
margin-left: -(size/2)
border-radius: size
background: #888

.ideal-check.checked
.ideal-check.checked.focus
Expand Down
1 change: 1 addition & 0 deletions styl/vars.styl
Expand Up @@ -20,6 +20,7 @@ icon-size = 16px
icon-padding = 8px

radiocheck-sprite = true
radiocheck-size = 18px
group-horizontal = false

// jQuery data
Expand Down

0 comments on commit cfda56b

Please sign in to comment.