1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-13 06:42:23 +04:00
Files
tabler/core/scss/ui/_nav.scss
T
falsulaiman 78383ef568 Update _nav.scss (#2133)
* Update _nav.scss

### Issue: Dash (`-`) causing W3C validator error and CSS issues

**Problem**:
The use of a dash (`-`) in certain areas is triggering errors in the W3C validator and affecting the proper functioning of CSS.

1. **HTML Issue**: The dash might be incorrectly placed in attribute names or element IDs, causing validation errors.
   - Example: `data-name` is fine, but ensure it's used correctly and within the valid context.

2. **CSS Issue**: If the dash is used improperly in class or ID names, it can cause selector issues in CSS.
   - Example: `.my-class-name` is correct, but make sure that the class is correctly applied to the element and styled properly in CSS.

**Proposed Fix**:
- Ensure that any attribute or class names are formatted correctly. For example, `data-name` is valid, but check for any spelling mistakes or misplaced dashes.
- In CSS, ensure proper selector syntax like:
   ```css
   .my-class-name {
       /* Styles here */
   }

* Fix margin calculation for nav links in _nav.scss

* Create red-pens-punch.md

---------

Co-authored-by: codecalm <codecalm@gmail.com>
Co-authored-by: Paweł Kuna <1282324+codecalm@users.noreply.github.com>
2025-02-06 18:23:13 +01:00

92 lines
1.6 KiB
SCSS

.nav-vertical {
&,
.nav {
flex-direction: column;
flex-wrap: nowrap;
}
.nav {
margin-left: 1.25rem;
border-left: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
padding-left: .5rem;
}
.nav-link.active,
.nav-item.show .nav-link {
font-weight: var(--#{$prefix}font-weight-bold);
}
&.nav-pills {
margin: 0 (-$nav-link-padding-x);
}
}
//
// Nav bordered
//
.nav-bordered {
border-bottom: $nav-bordered-border-width var(--#{$prefix}border-style) $nav-bordered-border-color;
.nav-item {
+ .nav-item {
margin-left: $nav-bordered-margin-x;
}
}
.nav-link {
padding-left: 0;
padding-right: 0;
margin: 0 0 calc(-1 * #{$nav-bordered-border-width});
border: 0;
border-bottom: $nav-bordered-link-active-border-width var(--#{$prefix}border-style) transparent;
}
.nav-link.active,
.nav-item.show .nav-link {
color: $nav-bordered-link-active-color;
border-color: $nav-bordered-link-active-border-color;
}
}
.nav-link {
display: flex;
@include transition(color $transition-time);
align-items: center;
}
.nav-link-toggle {
margin-left: auto;
padding: 0 .25rem;
@include transition(transform $transition-time);
@include caret();
&:after {
margin: 0;
}
@at-root .nav-link[aria-expanded="true"] & {
transform: rotate(180deg);
}
}
.nav-link-icon {
width: $nav-link-icon-size;
height: $nav-link-icon-size;
margin-right: .5rem;
color: $nav-link-icon-color;
svg {
display: block;
height: 100%;
}
}
.nav-fill {
.nav-item {
.nav-link {
justify-content: center;
}
}
}