# SASS course problem

**URL:** <https://forum.freecodecamp.org/t/sass-course-problem/602355>\
**Category:** Curriculum Help\
**Tags:** html, css\
**Created:** [April 3, 2023, 4:10pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355 "2023-04-03T16:10:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SquidWard96](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SquidWard96](https://forum.freecodecamp.org/u/SquidWard96)\
**Post date:** [April 3, 2023, 4:10pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/1 "2023-04-03T16:10:39Z")

</div>

I need help! I’m following a SASS course and I created a variables tab for all my $variables to use in my main SASS file. While creating a $mobile variable to create a default width size my :hover pink stopped working! Any reason why? i’ve gone back twice with no help.

 ![Screen Shot 2023-04-03 at 12.01.57 PM](https://global.discourse-cdn.com/freecodecamp/original/4X/e/0/1/e01aba26efb2348a1c3a423c6d7261e8a14a59f3.png)

 ![Screen Shot 2023-04-03 at 12.02.14 PM](https://global.discourse-cdn.com/freecodecamp/original/4X/a/a/c/aac1cc3db8e8695099ea4070c54f91849f6e89df.png)

---

<div class="post-metadata">

**Author:** ![DobarBREND](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dobarbrend/32/297954_2.png) [@DobarBREND](https://forum.freecodecamp.org/u/DobarBREND)\
**Post date:** [April 3, 2023, 5:39pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/2 "2023-04-03T17:39:34Z")

</div>

Post the entire code here. We cannot assume what can be an issue, relaying only to the text description of it.

---

<div class="post-metadata">

**Author:** ![SquidWard96](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SquidWard96](https://forum.freecodecamp.org/u/SquidWard96)\
**Post date:** [April 3, 2023, 5:54pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/3 "2023-04-03T17:54:36Z")

</div>

```auto
@import './resets';
@import './variables';

/*functions used to return values and compute values */
@function weight($weight-name) {
    @return map-get($font-weights , $weight-name );
}
/*mixin for defining styles */
@mixin flexCenter($direction) {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: $direction;
}

@mixin theme($light-theme: true) {
    @if $light-theme {
        background: lighten($primary-color, 100%);
        color: darken($text-color, 100%);
    }
}

@mixin mobile {
    @media (max-width: $mobile) {
        @content;
    }
}

body {
    background-color: $primary-color;
    color: $text-color;
}

.main {
    @include flexCenter(column);
    width: 80%;
    margin: 0 auto;
/* When you don't want to repeat the same word use a & */
/* To keep nested use interpolation #{&}*/    
#{&}_paragraph1 {
        font-weight: weight(bold);   
    
    &:hover {
        color: pink;
    }
}

#{&}_paragraph2 {
    @extend .main_paragraph1;

    &:hover {
        color: $accent-color;
    }
}

@include mobile {
    flex-direction: column;
}
}

.light {
    @include theme($light-theme: true);
}

```

```auto
$primary-color: #272727;
$accent-color: #ff652f;
$text-color: #fff;
$font-weights: (
    "regular": 400,
    "medium": 500,
    "bold": 700
);
$mobile: 800px;

```

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [April 3, 2023, 6:19pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/4 "2023-04-03T18:19:09Z")

</div>

The variables file is unsaved in the images you posted.

---

<div class="post-metadata">

**Author:** ![SquidWard96](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SquidWard96](https://forum.freecodecamp.org/u/SquidWard96)\
**Post date:** [April 3, 2023, 6:21pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/5 "2023-04-03T18:21:34Z")

</div>

Lol woww. Thanks it worked.

---

<div class="post-metadata">

**Author:** ![lasjorg](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lasjorg/32/280761_2.png) [@lasjorg](https://forum.freecodecamp.org/u/lasjorg)\
**Post date:** [April 3, 2023, 6:26pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/6 "2023-04-03T18:26:17Z")

</div>

Don’t worry we have all been there.

In fact, in time your muscle memory for saving will be so strong it will happen all by itself, constantly, everywhere. It can actually be a little painful just how badly you want to press Ctrl + S all the time.

---

<div class="post-metadata">

**Author:** ![SquidWard96](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SquidWard96](https://forum.freecodecamp.org/u/SquidWard96)\
**Post date:** [April 3, 2023, 6:27pm UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/7 "2023-04-03T18:27:09Z")

</div>

hahaha, i can’t wait till i’m strong like u programmer Goku-senpai

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [October 3, 2023, 6:27am UTC](https://forum.freecodecamp.org/t/sass-course-problem/602355/8 "2023-10-03T06:27:55Z")

</div>

Closed on October 3, 2023, 6:27am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
