SU-SWS/stanford_profile

View on GitHub
themes/minimally_branded_subtheme/src/scss/theme/_link.scss

Summary

Maintainability
Test Coverage

Nesting depth 5 greater than max of 4
Open

          &:hover,

Nesting Depth

Rule nesting-depth will enforce how deeply a selector can be nested.

Options

  • max-depth: number (defaults to 2)

Examples

When enabled (assuming max-depth: 2) the deepest element (&:hover and &--modifier) are at at depth 2. Any nested selector deeper is disallowed:

.foo {
  .baz {
    &:hover {
      // Deepest Nest Allowed
    }
  }
}

.block {
  &__element {
    &--modifier {
      // Deepest Nest Allowed
    }
  }
}

Nesting depth 5 greater than max of 4
Open

          &:hover,

Nesting Depth

Rule nesting-depth will enforce how deeply a selector can be nested.

Options

  • max-depth: number (defaults to 2)

Examples

When enabled (assuming max-depth: 2) the deepest element (&:hover and &--modifier) are at at depth 2. Any nested selector deeper is disallowed:

.foo {
  .baz {
    &:hover {
      // Deepest Nest Allowed
    }
  }
}

.block {
  &__element {
    &--modifier {
      // Deepest Nest Allowed
    }
  }
}

Nesting depth 5 greater than max of 4
Open

          &:after {

Nesting Depth

Rule nesting-depth will enforce how deeply a selector can be nested.

Options

  • max-depth: number (defaults to 2)

Examples

When enabled (assuming max-depth: 2) the deepest element (&:hover and &--modifier) are at at depth 2. Any nested selector deeper is disallowed:

.foo {
  .baz {
    &:hover {
      // Deepest Nest Allowed
    }
  }
}

.block {
  &__element {
    &--modifier {
      // Deepest Nest Allowed
    }
  }
}

Nesting depth 5 greater than max of 4
Open

          &:after {

Nesting Depth

Rule nesting-depth will enforce how deeply a selector can be nested.

Options

  • max-depth: number (defaults to 2)

Examples

When enabled (assuming max-depth: 2) the deepest element (&:hover and &--modifier) are at at depth 2. Any nested selector deeper is disallowed:

.foo {
  .baz {
    &:hover {
      // Deepest Nest Allowed
    }
  }
}

.block {
  &__element {
    &--modifier {
      // Deepest Nest Allowed
    }
  }
}

Space expected between blocks
Open

      > a.su-link--external {

Empty Line Between Blocks

Rule empty-line-between-blocks will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.

Options

  • include: true/false (defaults to true)
  • allow-single-line-rulesets: true/false (defaults to true)

Examples

include

When include: true, the following are allowed. When include: false, the following are disallowed:

.foo {
  content: 'foo';

  .bar {
    content: 'bar';

    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

When include: false, the following are allowed. When include: true, the following are disallowed:

.foo {
  content: 'foo';
  .bar {
    content: 'bar';
    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

allow-single-line-rulesets

When allow-single-line-rulesets: true, the following are allowed. When allow-single-line-rulesets: false, the following are disallowed:

.foo { content: 'foo'; }
.bar { content: 'bar'; }
.baz { content: 'baz'; }

Space expected between blocks
Open

      &:after {

Empty Line Between Blocks

Rule empty-line-between-blocks will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.

Options

  • include: true/false (defaults to true)
  • allow-single-line-rulesets: true/false (defaults to true)

Examples

include

When include: true, the following are allowed. When include: false, the following are disallowed:

.foo {
  content: 'foo';

  .bar {
    content: 'bar';

    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

When include: false, the following are allowed. When include: true, the following are disallowed:

.foo {
  content: 'foo';
  .bar {
    content: 'bar';
    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

allow-single-line-rulesets

When allow-single-line-rulesets: true, the following are allowed. When allow-single-line-rulesets: false, the following are disallowed:

.foo { content: 'foo'; }
.bar { content: 'bar'; }
.baz { content: 'baz'; }

Pseudo-elements must start with double colons
Open

        &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Pseudo-elements must start with double colons
Open

          &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Pseudo-elements must start with double colons
Open

        &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Space expected between blocks
Open

          &:after {

Empty Line Between Blocks

Rule empty-line-between-blocks will enforce whether or not nested blocks should include a space between the last non-comment declaration or not.

Options

  • include: true/false (defaults to true)
  • allow-single-line-rulesets: true/false (defaults to true)

Examples

include

When include: true, the following are allowed. When include: false, the following are disallowed:

.foo {
  content: 'foo';

  .bar {
    content: 'bar';

    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

When include: false, the following are allowed. When include: true, the following are disallowed:

.foo {
  content: 'foo';
  .bar {
    content: 'bar';
    // Waldo
    &--baz {
      content: 'baz';
    }
  }
}

allow-single-line-rulesets

When allow-single-line-rulesets: true, the following are allowed. When allow-single-line-rulesets: false, the following are disallowed:

.foo { content: 'foo'; }
.bar { content: 'bar'; }
.baz { content: 'baz'; }

Type-selector should be nested within its parent Class
Open

.ds-entity--stanford-person .stanford-person a {

Force Element Nesting

Rule force-element-nesting will enforce the nesting of elements

Examples

When enabled, the following are disallowed:

div p {
  content: '';
}

.parent {
  &__child h1 {
    content: '';
  }
}

a[target="_blank"] span {
  content: '';
}

When enabled, the following are allowed:

div {
  p {
    content: '';
  }
}

.parent {
  &__child {
    h1 {
      content: '';
    }
  }
}

a[target="_blank"] {
  span {
    content: '';
  }
}

Pseudo-elements must start with double colons
Open

          &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Pseudo-elements must start with double colons
Open

    &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Pseudo-elements must start with double colons
Open

      &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Class should be nested within its parent Type-selector
Open

      > a.su-link--external {

Force Element Nesting

Rule force-element-nesting will enforce the nesting of elements

Examples

When enabled, the following are disallowed:

div p {
  content: '';
}

.parent {
  &__child h1 {
    content: '';
  }
}

a[target="_blank"] span {
  content: '';
}

When enabled, the following are allowed:

div {
  p {
    content: '';
  }
}

.parent {
  &__child {
    h1 {
      content: '';
    }
  }
}

a[target="_blank"] {
  span {
    content: '';
  }
}

No trailing whitespace allowed
Open

      }

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

No trailing whitespace allowed
Open

      &:focus {

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

Pseudo-elements must start with double colons
Open

            &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Type-selector should be nested within its parent Class
Open

.stanford-people-grid .views-row .views-field-title a {

Force Element Nesting

Rule force-element-nesting will enforce the nesting of elements

Examples

When enabled, the following are disallowed:

div p {
  content: '';
}

.parent {
  &__child h1 {
    content: '';
  }
}

a[target="_blank"] span {
  content: '';
}

When enabled, the following are allowed:

div {
  p {
    content: '';
  }
}

.parent {
  &__child {
    h1 {
      content: '';
    }
  }
}

a[target="_blank"] {
  span {
    content: '';
  }
}

No trailing whitespace allowed
Open

} 

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

Pseudo-elements must start with double colons
Open

      &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Class should be nested within its parent Class
Open

.ds-entity--stanford-person .stanford-person a {

Force Element Nesting

Rule force-element-nesting will enforce the nesting of elements

Examples

When enabled, the following are disallowed:

div p {
  content: '';
}

.parent {
  &__child h1 {
    content: '';
  }
}

a[target="_blank"] span {
  content: '';
}

When enabled, the following are allowed:

div {
  p {
    content: '';
  }
}

.parent {
  &__child {
    h1 {
      content: '';
    }
  }
}

a[target="_blank"] {
  span {
    content: '';
  }
}

No trailing whitespace allowed
Open

          color: $su-color-digital-blue;

No Trailing Whitespace

Rule no-trailing-whitespace will enforce that trailing whitespace is not allowed.

Examples

When enabled, the following are disallowed (\s denotes spaces or tabs):

.foo {\s
  margin: 1.5rem;
}

.foo {
  margin: .5rem;\s
}

.foo {
  margin: .4rem;
}\s

Qualifying elements are not allowed for class selectors
Open

      > a.su-link--external {

No Qualifying Elements

Rule no-qualifying-elements will enforce that selectors are not allowed to have qualifying elements.

Options

  • allow-element-with-attribute: true/false (defaults to false)
  • allow-element-with-class: true/false (defaults to false)
  • allow-element-with-id: true/false (defaults to false)

Examples

By default, the following are disallowed:

div.foo {
  content: 'foo';
}

ul#foo {
  content: 'foo';
}

input[type='email'] {
  content: 'foo';
}

allow-element-with-attribute

When allow-element-with-attribute: true, the following are allowed. When allow-element-with-attribute: false, the following are disallowed.

input[type='email'] {
  content: 'foo';
}

a[href] {
  content: 'foo';
}

allow-element-with-class

When allow-element-with-class: true, the following are allowed. When allow-element-with-class: false, the following are disallowed.

div.foo {
  content: 'foo';
}

h1.bar {
  content: 'foo';
}

allow-element-with-id

When allow-element-with-id: true, the following are allowed. When allow-element-with-id: false, the following are disallowed.

ul#foo {
  content: 'foo';
}

p#bar {
  content: 'foo';
}

Pseudo-elements must start with double colons
Open

        &:after {

Pseudo-element

Rule pseudo-element will enforce that:

  • Pseudo-elements must start with double colons.
  • Pseudo-classes must start with single colon.

Examples

When enabled, the following are allowed:

.foo::before {
  content: "bar";
}

.foo:hover {
  content: "bar";
}

When enabled, the following are disallowed:

.foo:before {
  content: "bar";
}

.foo::hover {
  content: "bar";
}

Class should be nested within its parent Class
Open

.stanford-people-grid .views-row .views-field-title a {

Force Element Nesting

Rule force-element-nesting will enforce the nesting of elements

Examples

When enabled, the following are disallowed:

div p {
  content: '';
}

.parent {
  &__child h1 {
    content: '';
  }
}

a[target="_blank"] span {
  content: '';
}

When enabled, the following are allowed:

div {
  p {
    content: '';
  }
}

.parent {
  &__child {
    h1 {
      content: '';
    }
  }
}

a[target="_blank"] {
  span {
    content: '';
  }
}

There are no issues that match your filters.

Category
Status