Skip to content

added icon in form validation in #22762#23312

Closed
chiraggmodi wants to merge 7 commits intotwbs:v4-devfrom
chiraggmodi:issue_p_22762
Closed

added icon in form validation in #22762#23312
chiraggmodi wants to merge 7 commits intotwbs:v4-devfrom
chiraggmodi:issue_p_22762

Conversation

@chiraggmodi
Copy link
Copy Markdown
Contributor

added form validation icon mention in #22762

Comment thread scss/mixins/_forms.scss Outdated

&:focus {
box-shadow: 0 0 0 .2rem rgba($color,.25);
box-shadow: 0 0 0 0.2rem rgba($color, 0.25);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.2 should be written without a leading zero as .2
0.25 should be written without a leading zero as .25

Comment thread scss/mixins/_forms.scss Outdated
&.is-#{$state} {
~ .custom-control-indicator {
background-color: rgba($color, .25);
background-color: rgba($color, 0.25);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.25 should be written without a leading zero as .25

Comment thread scss/mixins/_forms.scss Outdated
}

// Validation icon top for textarea
textarea.form-control,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid qualifying class selectors with an element.

Comment thread scss/mixins/_forms.scss Outdated

&:focus {
box-shadow: 0 0 0 .2rem rgba($color,.25);
box-shadow: 0 0 0 0.2rem rgba($color, 0.25);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.2 should be written without a leading zero as .2
0.25 should be written without a leading zero as .25

Comment thread scss/mixins/_forms.scss Outdated

&:focus {
box-shadow: 0 0 0 .2rem rgba($color,.25);
box-shadow: 0 0 0 0.2rem rgba($color, 0.25);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.2 should be written without a leading zero as .2
0.25 should be written without a leading zero as .25

Comment thread scss/mixins/_forms.scss Outdated
&.is-#{$state} {
~ .custom-control-indicator {
background-color: rgba($color, .25);
background-color: rgba($color, 0.25);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.25 should be written without a leading zero as .25

Comment thread scss/mixins/_forms.scss Outdated
}

// Validation icon top for textarea
textarea.form-control,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid qualifying class selectors with an element.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

can any one please guide me on this issue?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't this work?

element {
  &.class {
  }
}

EDIT: nah, it would still complain.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@XhmikosR Thank you!!

Comment thread scss/mixins/_forms.scss Outdated

&:focus {
box-shadow: 0 0 0 .2rem rgba($color,.25);
box-shadow: 0 0 0 0.2rem rgba($color, 0.25);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.2 should be written without a leading zero as .2
0.25 should be written without a leading zero as .25

@chiraggmodi
Copy link
Copy Markdown
Contributor Author

can any one let me know what is the right way for this Avoid qualifying class selectors with an element. validation issue?

Comment thread scss/mixins/_forms.scss Outdated

// Validation icon top for textarea
textarea {
&.form-control,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line contains trailing whitespace

Comment thread scss/mixins/_forms.scss Outdated

// Validation icon top for textarea
textarea {
&.form-control,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Line contains trailing whitespace

Comment thread scss/mixins/_forms.scss Outdated
background-image: $form-icon-success;
}

@if $state == "invalid" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe @else if...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yup definitely good suggestion @vsn4ik

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@vsn4ik and @XhmikosR made changes as per suggestion.

Comment thread scss/mixins/_forms.scss Outdated
background-image: $form-icon-success;
}

@else if $state == "invalid" {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@else should be placed on same line as previous curly brace

@XhmikosR
Copy link
Copy Markdown
Member

@mdo: what do we do with this? I think we better drop this from a quick look...

@mdo
Copy link
Copy Markdown
Member

mdo commented Jul 8, 2018

New PR at #26824.

@mdo mdo closed this Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants