aboutsummaryrefslogtreecommitdiffstats
path: root/demo/src/sass/components/links.scss
blob: b293086292aecb7388169b6606df75135ee0916e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// ==========================================================================
// Links
// ==========================================================================

// Make a <button> look like an <a>
button.faux-link {
    @extend a; // stylelint-disable-line
    @include cancel-button-styles();
}

// Links
a {
    border-bottom: 1px dotted currentColor;
    color: $color-link;
    font-weight: $font-weight-bold;
    position: relative;
    text-decoration: none;
    transition: all 0.2s ease;

    &::after {
        background: currentColor;
        content: '';
        height: 1px;
        left: 50%;
        position: absolute;
        top: 100%;
        transform: translateX(-50%);
        transition: width 0.2s ease;
        width: 0;
    }

    &:hover,
    &:focus {
        border-bottom-color: transparent;
        outline: 0;

        &::after {
            width: 100%;
        }
    }

    &.tab-focus {
        @include tab-focus();
    }

    &.no-border::after {
        display: none;
    }
}