At-rule Or Selector Expected Error- Following Jekyll Tutorial - Help Trang chủ » Visual Studio Code At-rule Or Selector Expected » At-rule Or Selector Expected Error- Following Jekyll Tutorial - Help Có thể bạn quan tâm Visual Studio Code Flowchart Extension Visual Studio Code Hangi Dilleri Destekler Visual Studio Code Hazır Kodlar Visual Studio Code Kod Düzenleme Eklentisi Visual Studio Code örnek Projeler At-rule or Selector expected error- Following Jekyll Tutorial Help Kes01331 December 30, 2020, 12:19am 1 Hi, I’m following the Jekyll tutorial and I’m having a problem on the Assets step (https://jekyllrb.com/docs/step-by-step/07-assets/). I’ve updated the Navigation and Default layout files as indicated in the instructions, and created the _assets/css/styles.scss and _sass/main.scss files. On styles.scss VS shows a problem “at-rule or selector expected”. I thought @import was an at-rule…so I’m confused. Can anyone please help?sass2649×1566 186 KB chuckhoupt December 30, 2020, 1:39am 2 I think VS is complaining about the YAML front-matter dashes (---). The front-matter is there to ensure that Jekyll processes the file. Unfortunately this means the top style.scss isn’t valid SCSS, so you’ll have to ignore the error. Kes01331 December 30, 2020, 6:45am 3 Thank you. Would this be why it doesn’t work then? The current link page should turn green. I don’t know much of anything about Sass, but I was looking through the documentation, and I did see @import. The way it’s written looks like what was in the documentation, so I guess I’m confused about why it wouldn’t be valid. sass11512×1525 177 KB The point of using Sass isn’t clearly explained in the tutorial either. From a beginner perspective it just seems as though it’s an extra step. Would it be easier to use CSS in the _assets/css/styles file and do away with the _sass/main.scss file & folder? I appreciate your help! MichaelCurrin December 30, 2020, 10:29am 4 I have had issues as well where VS Code doesn’t like the frontmatter in .scss file, squashing it all one the first line. I switched to this extension as my SCSS formatter and enjoying that. https://marketplace.visualstudio.com/items?itemName=Sibiraj-S.vscode-scss-formatter Check out a pattern of a theme. A theme like minima has assets/main.scss on 2.5 show below (or see assets/css/style.scss on Minima 3) --- --- @import "minima" And all your custom styling goes after that import. You can write your code as SCSS or just plain CSS. You don’t have to define the _sass/ directory in your project, which is where minima defines the code that gets imported with the import above. If you are making your own theme or a site without a theme, then you might want to use _sass/ to put your styles. Or you might be okay with assets/main.scss or assets/css/styles.css. See my guide on this topic https://michaelcurrin.github.io/code-cookbook/recipes/jekyll/styling-with-scss/customize.html AIdrisy0139 February 3, 2021, 1:07am 5 Has anyone been able to solve @Kess01331’s problem? I tried doing compiling without VS Code, just through notepad and CMD, still had the same issue. I’m following the Jekyll same tutorial, and am on a windows box. Whenever I click on the navigation links I get this error in CMD. [2021-02-02 20:03:17] ERROR /assets/css/styles.scss’ not found.` chuckhoupt February 3, 2021, 1:59am 6 Possibly a typo? The layout should link to the compiled CSS file, style.css, not the original SASS/SCSS source file style.scss. I.e. the stylesheet link in the layout head should look like this (note .css, not .scss): <link rel="stylesheet" href="/assets/css/styles.css"> 1 Like MichaelCurrin February 3, 2021, 11:40am 7 Indeed. The SCSS must be compiled by adding frontmatter. --- --- h1 ... And referenced as .css as it will be .css in the _site output directory. Another issue may be not using the GH Pages subpath <link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url }}"> 1 Like AIdrisy0139 February 3, 2021, 3:42pm 8 Yeah that fixed it! Thanks for the help. Still getting used to how there’s the uncompiled and compiled versions of all of the files. Related topics Topic Replies Views Activity Jekyll is not compiling scss files Help 4 10372 July 16, 2017 Invalid CSS after "-": expected 1 selector or at-rule, was "---" (SassC::SyntaxError) Help 1 3523 March 24, 2021 Error in Step by Step Tutorial Help 20 4122 December 10, 2024 Bootstrap Import throws Invalid CSS error Help 5 2740 April 21, 2022 Fixing vscode scss linting "errors" on front matter Share 1 5305 March 24, 2019 Từ khóa » Visual Studio Code At-rule Or Selector Expected Error "property Value Expected Css" And "at-rule Or Selector Expected ... `at-rule Or Selector Expected` · Issue #189 · Styled-components ... At-rule Or Selector Expectedcss(css-ruleorselectorexpected ... - GitHub I'am Getting An Error "at-rule Or Selector Expected"? At-rule Or Selector Expectedcss(css-ruleorselectorexpected) - YouTube CSS, SCSS, And Less Support In Visual Studio Code Error "Property Value Expected Css" And "At-Rule Or Selector ... VSCode p At-rule Or Selector Expected Aura Super Badge At-rules - CSS: Cascading Style Sheets - MDN Web Docs VS Code Errors And Warnings When Using @tailwind Directives 解决vscode报错“} Expected”和"at-rule Or Selector Expected" - 简书 Visual Studio Code - Error "property Value Expected Css" And "at-rule ...