Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error upon jekyll serve #12

Open
SimonEnsemble opened this issue Jan 28, 2023 · 1 comment
Open

error upon jekyll serve #12

SimonEnsemble opened this issue Jan 28, 2023 · 1 comment

Comments

@SimonEnsemble
Copy link

with the new version of jekyll, the site does not launch upon jekyll serve.

Error: Declarations may only be used within style rules.
    ╷
180 │         margin-top: 2rem;
    │         ^^^^^^^^^^^^^^^^
    ╵
  /Users/cokes/catbook/assets/css/main.scss 180:9  @content
  _flexible.scss 21:9                              mobile-only()
  /Users/cokes/catbook/assets/css/main.scss 179:5  root stylesheet
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
                    Declarations may only be used within style rules.
                    ------------------------------------------------
      Jekyll 4.3.1   Please append `--trace` to the `serve` command
                     for any additional information or backtrace.
                    ------------------------------------------------
/opt/homebrew/lib/ruby/gems/3.1.0/gems/jekyll-sass-converter-3.0.0/lib/jekyll/converters/scss.rb:175:in `rescue in convert': Declarations may only be used within style rules. (Jekyll::Converters::Scss::SyntaxError)
@songtao-ye
Copy link

open "assets\css\main.scss"

change

.aboutme {
    @include breakpoint(medium) {
        max-width: 30rem;
        margin-top: 5.5rem;

        img {
            float: none;
        }
    }
    }

    @include mobile-only {
        margin-top: 2rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }

to

.aboutme {
    @include breakpoint(medium) {
        max-width: 30rem;
        margin-top: 5.5rem;

        img {
            float: none;
        }
    }

    @include mobile-only {
        margin-top: 2rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants