Skip to content

Tweak color function #25

@neutraltone

Description

@neutraltone

Add warnings to color function like this:

@function color($color-name, $tone: base) {
	@if not map-has-key($colors, $color-name) {
		@warn "Color name `#{$color-name}` not found.";
	}
	@if not map-has-key(map-get($colors, $color-name), $tone) {
		@warn "Tone `#{$tone}` not found.";
	}
	@return map-get(map-get($colors, $color-name), $tone);
}

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions