Fractal Starter
Project version : 0.1.2
<nav class="main-nav">
    <ul>
        <li><a href="#">Nav link</a></li>
    </ul>
</nav>
<nav class="main-nav">
    <ul><li><a href="{{link.href}}">{{link.text}}</a></li></ul>
</nav>
{
  "link": {
    "href": "#",
    "text": "Nav link"
  }
}
  • Content:
    a{
        color: $c-link-color;
        color: var(--color-theme, $c-link-color);
        @include transition;
        
        &:hover,
        &:active,
        &:focus {
            color: $c-link-hover-color;
            color: var(--color-theme-hover, $c-link-hover-color);
            text-decoration-color: transparent;
        }
        &:focus {
            outline-color: $c-brand-gold;
        } 
    }
    
    nav.main-nav > ul > li > a {
        position: relative;
    	display: block;
    	padding: .5rem;
        margin:  0;
    	color: $c-font-color;
        text-decoration: none;
        font-size: rem(18px);
    
        @include mediaWQuery($media-query-l) {
           &::before {
                content: '';
                @include absPosition(false, false, 5px, .5rem);
                width: 0;
                max-width: 50%;
                height: 2px;
                opacity: 0;
                border-radius: $border-radius-xs;
                background: $c-link-border-color;
                @include transition;
            } 
        }
        
        &:hover,
        &:active,
        &:focus {
            &::before {
                opacity: 1;
                width: 40px;
            }
        }
    }
    
    nav.main-nav > ul > li.current-menu-item > a::before,
    nav.main-nav > ul > li.current-menu-parent > a::before {
        opacity: 1;
        width: 40px;
    }
    
    nav.main-nav > ul ul a{
        font-size: rem(18px);
    }
  • URL: /components/raw/link/_link.scss
  • Filesystem Path: components/04-elements/01-typography/04-link/_link.scss
  • Size: 1.3 KB

There are no notes for this item.