New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New component: Switch. #1414

Merged
merged 1 commit into from Feb 2, 2013

Conversation

Projects
None yet
2 participants
@ghinda
Copy link
Contributor

ghinda commented Jan 19, 2013

Switches can be used instead of regular radio buttons, to switch between two or more options. They are very customizable and use styles from other components such as buttons or panels.

The switches are CSS-only, and only show-up only modern browsers. Browsers without support for media queries get standard form elements.

The class names used are similar to the ones used by F4 classes for grids (.switch, .switch-3, .switch-4, .switch-5).

New feature: Switch.
Switches can be used instead of regular radio buttons, to switch between two or more options. They are very customizable and use styles from other components such as buttons or panels.

The switches are CSS-only, and only show-up on modern browsers. Browsers without support for media queries get standard form elements.

@ghinda ghinda referenced this pull request Jan 19, 2013

Closed

Toggle switches #1267

@hatefulcrawdad

This comment has been minimized.

Copy link

hatefulcrawdad commented Feb 1, 2013

@ghinda, thanks for this! We'll look at adding this into 4.0 over the next few weeks.

@hatefulcrawdad hatefulcrawdad merged commit c11bb03 into zurb:4.0-wip Feb 2, 2013

@hatefulcrawdad

This comment has been minimized.

Copy link

hatefulcrawdad commented Feb 2, 2013

@ghinda, this was awesome! I was going to wait to pull it in, but couldn't resist. Very smartly written my friend. I may end up tweaking styles a bit or adding default styles incase you don't attach .button. Really clever, thanks! Looking forward to more contributions from you.

@ghinda

This comment has been minimized.

Copy link
Contributor

ghinda commented Feb 2, 2013

Wow, thanks!
Glad you were able to pull-in the changes so fast! I'm sure F4 will be a game changer!

@ghinda ghinda deleted the ghinda:switch branch Feb 2, 2013

@hatefulcrawdad

This comment has been minimized.

Copy link

hatefulcrawdad commented Feb 3, 2013

Thanks for the work. Would love to work with you more if you'd like on 4. Do you like to make mixins?

@ghinda

This comment has been minimized.

Copy link
Contributor

ghinda commented Feb 3, 2013

Sure, would love to! Got anything specific in mind?

@hatefulcrawdad

This comment has been minimized.

Copy link

hatefulcrawdad commented Feb 7, 2013

@ghinda, are you a member of www.forrst.com? If not, we can invite you in. We'd like to share you switch code to get feedback from the community.

@ghinda

This comment has been minimized.

Copy link
Contributor

ghinda commented Feb 8, 2013

@zurbchris Yeah, I got a forrst account, but I haven't posted anything. Anything you need me to do?

Username is the same: ghinda
http://forrst.com/people/ghinda

@hatefulcrawdad

This comment has been minimized.

Copy link

hatefulcrawdad commented Feb 8, 2013

Well do you mind if we share your switch code on there today to get feedback from the community? I think you are in a different time zone, so we might just do it anyway. It's good code.

@ghinda

This comment has been minimized.

Copy link
Contributor

ghinda commented Feb 8, 2013

Just saw the blog and the Forrst posts, thanks a lot for the props! I'm more than happy that you posted them!

There's a 10h difference (I'm in Romania - GMT+2) between us, that's the reason for my late responses.

@hatefulcrawdad

This comment has been minimized.

Copy link

hatefulcrawdad commented Feb 8, 2013

Awesome, people seem to be loving it. I'd love to see if you could turn this into a mixin for people to use more semantically. You can take a look at our _buttons.scss in the 4.0-wip branch to get an idea for how we're structuring things.

@ghinda

This comment has been minimized.

Copy link
Contributor

ghinda commented Feb 9, 2013

I've opened a new pull-request with the new goodies.
#1527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment