/* Sass Document */ 
@import variables
/* Main mixin for generating theme variables from lists */
/* Four @each statements, instead of one earlier in the nesting creeates a more succinct final css. */
=themeGenerate($listname, $prefix)
	\:root
		@each $property, $valueL, $valueD in $listname
			#{$prefix}#{$property}: #{$valueL}
	body.light-theme
		&, & > *, & + *
			@each $property, $valueL, $valueD in $listname
				#{$prefix}#{$property}: #{$valueL}
	@media (prefers-color-scheme: dark)
		body
			&, & > *, & + *
				@each $property, $valueL, $valueD in $listname
					#{$prefix}#{$property}: #{$valueD}
	body.dark-theme
		&, & > *, & + *
			@each $property, $valueL, $valueD in $listname
				#{$prefix}#{$property}: #{$valueD}


+themeGenerate($globalTheme, "--")

/* Early version of the mixin for seperate dark and light lists. May still prove useful. */
=themeLight($listname, $prefix)
	\:root
		@each $property, $value in $listname
				#{$prefix}#{$property}: #{$value}
	body.light-theme
		&, & > *, & + *
			@each $property, $value in $listname
				#{$prefix}#{$property}: #{$value}

=themeDark($listname, $prefix)
	@media (prefers-color-scheme: dark)
		body
			&, & > *, & + *
				@each $property, $value in $listname
					#{$prefix}#{$property}: #{$value}
	body.dark-theme
		&, & > *, & + *
			@each $property, $value in $listname
				#{$prefix}#{$property}: #{$value}

/* Div Background Properties Mixin */
=divIcon($size)
	position: relative
	background-size: $size
	background-position: center
	background-repeat: no-repeat
	display: inline-block