Skip to content

Styles for [input:disabled] on checkboxes and radio. Issue #17918 #17921

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

Closed
wants to merge 11 commits into from
Closed

Styles for [input:disabled] on checkboxes and radio. Issue #17918 #17921

wants to merge 11 commits into from

Conversation

markau
Copy link
Contributor

@markau markau commented Oct 14, 2015

Fixes #17918.

@cvrebert
Copy link
Collaborator

If possible, exclude dist/css/bootstrap.css* and docs.min.css* from the PR.

@cvrebert
Copy link
Collaborator

Also, it's not required, but you might want to associate the email address you used for your commit with your GitHub account so that you'll get credit for it in your GitHub profile page.

@markau
Copy link
Contributor Author

markau commented Oct 14, 2015

Thanks for the Git help, @cvrebert, much appreciated. I have added the email to my GitHub profile (and updated git config with the preferred one so this doesn't happen again).

I tried to git rm the files, then commit with the --ammend flag to correct the PR and remove those files. I think I just made a mess of my local repo though. Should I try some more? (also, would a push following an ammended commit update the email address used for the commit?)

I'd like to get this right, but don't want to waste your time if it's going to be complicated.

Thank you!

@markau
Copy link
Contributor Author

markau commented Oct 14, 2015

Ok I realized the commits had not been pushed. I think the commit is now correct (i.e. rm'd the dist\css files). Interested in how it looks to you, @cvrebert. Thank you!

@cvrebert
Copy link
Collaborator

Ok I realized the commits had not been pushed. I think the commit is now correct (i.e. rm'd the dist\css files). Interested in how it looks to you

Doesn't quite look right. (The files I mentioned shouldn't be in the diff at all.)

Should I try some more?

Nah, that's all right. We can fix it on our end when merging this.
(We'll use "git rebase" to do the fixing; you can google around for info on rebasing if you're interested, but it's somewhat advanced.)

(also, would a push following an amended commit update the email address used for the commit?)

To update the author info, you'd need to do git commit --amend --reset-author , and then do git push --force (which should be used with caution since it can "delete" (I'm oversimplifying) commits, but should be safe in this case).

@markau
Copy link
Contributor Author

markau commented Oct 14, 2015

Thanks for the info, Chris. I will have a go at updating the email tomorrow when back in the office.

@@ -83,6 +83,10 @@
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K);
@include box-shadow(none);
}

input:disabled ~ .c-indicator {
background-color: #bbb;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably use a variable for this color

@markau
Copy link
Contributor Author

markau commented Oct 15, 2015

I did wonder that and I'll take a look. Thanks for your patience, Chris. I have used open source software for years and this is my first meaningful contribution to a project, so I am happy to make the effort to get it right.

If I make a change to use a variable, would it be a new commit/push (referencing this issue number?)

@cvrebert
Copy link
Collaborator

No problem! 😄 Thanks for giving back to the community ❤️

The variable declaration should be added to _variables.scss

If I make a change to use a variable, would it be a new commit/push (referencing this issue number?)

Yes, that'd be fine.

@markau
Copy link
Contributor Author

markau commented Oct 16, 2015

I'll include the doc changes in the commit, but that is probably the most subjective part because you might not like the wording. Ideally, I would show you a diff of the changes for review prior to committing. How best to achieve this?

@cvrebert
Copy link
Collaborator

Eh, you might as well just commit your suggestion and then depending on the feedback either you can push more fixup commits or we can fix it ourselves when we go to merge it. In any case, we'll squash it into a single commit on our end when we merge this PR.

@markau
Copy link
Contributor Author

markau commented Oct 16, 2015

Thanks once again, Chris. I'll add the doco commit later when I can test (Jekyll setup is problematic on this machine.)

@@ -83,6 +83,11 @@
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNy4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iOHB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDggOCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgOCA4IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0wLDN2Mmg4VjNIMHoiLz4NCjwvc3ZnPg0K);
@include box-shadow(none);
}

input:disabled ~ .c-indicator {
background-color: $custom-form-bg-color-disabled;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, background-color

}
~ .c-indicator-label {
color: $custom-form-label-color-disabled;
cursor:not-allowed;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colon after property should be followed by at least one space


input:disabled {
~ .c-indicator {
background-color: $custom-form-bg-color-disabled;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered cursor, background-color

background-color: $custom-form-bg-color-disabled;
}
~ .c-indicator-label {
cursor: not-allowed;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, cursor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, cursor

@markau
Copy link
Contributor Author

markau commented Oct 18, 2015

Hello Chris, me again. While I have tested every change prior to commit, I clearly haven't linted. Sorry for the hound spam. Lesson learned.

Can I just check whether you are likely to be happy with wrapping the checkbox/radio label in a span? This is in order to apply the cursor: none; style. I ask because it adds a relatively large chunk of characters to the html (every time an element is used) for what is a small detail (and only pertinent when the element is disabled). i.e.

before:

<label class="c-input c-checkbox">
    <input type="checkbox" checked="checked">
    <span class="c-indicator"></span>
    Can toggle this
</label>

after:

<label class="c-input c-checkbox">
    <input type="checkbox" checked="checked">
    <span class="c-indicator"></span>
    <span class="c-indicator-label">Can toggle this</span>
</label>

I tend to think the cleaner the html the better, but I see the value either way. I'm curious which way you'd want to go.

@cvrebert
Copy link
Collaborator

Can I just check whether you are likely to be happy with wrapping the checkbox/radio label in a span?

Those sorts of design specifics regarding the custom form widgets are @mdo's department rather than mine.

@mdo
Copy link
Member

mdo commented Jan 6, 2016

Changes from here are now part of #18771 (squashed and rebased there). Thanks!

@mdo mdo closed this Jan 6, 2016
@mdo mdo added this to the v4.0.0-alpha.3 milestone Jan 6, 2016
@markau
Copy link
Contributor Author

markau commented Jan 6, 2016

Thanks @mdo, it's great to have made even a small contribution. Will I be famous and show up as a contributor? (I'm a simple man 😊)

@mdo
Copy link
Member

mdo commented Jan 6, 2016

Hah, yeah, you'll be on the contributors list once the v4-dev branch makes it into master :).

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

Successfully merging this pull request may close these issues.

4 participants