Skip to content

[Bug] - Consolidate Snippet getting failed #112

@gihanrangana

Description

@gihanrangana

What bug did you find in the codebase?

i have added new snippet for scss under the layout category, but it's getting error when run the consolidate snippet check

this is my snippet

---
title: Dark Theme
description: SCSS mixin to change styles for dark themes.
author: gihanrangana
tags: scss, css, mixin, snippet, dark-theme, layout
---

```scss
@mixin isDark($type: 'module') {
	$root: &;

	@if $type == 'module' {
		:global {
			@at-root body[theme='dark'] #{$root} {
				@content;
			}
		}
	} @else {
		&[theme='dark'] {
			@content;
		}
	}
}

// Usage:
.container{
	background: #f0f0f0;
	@include isDark {
		background: #222;
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions