{"id":20292958,"url":"https://github.com/helleworldgit/sass-light-dark-theme","last_synced_at":"2025-10-24T03:55:27.606Z","repository":{"id":118891461,"uuid":"208771105","full_name":"helleworldGIT/SASS-Light-Dark-theme","owner":"helleworldGIT","description":"This is an example of how to create a Light/Dark theme project in SASS.","archived":false,"fork":false,"pushed_at":"2019-09-16T11:02:32.000Z","size":162,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-14T15:20:58.643Z","etag":null,"topics":["css","dark","light","mode","sass","scss","scss-directives"],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helleworldGIT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-16T10:19:29.000Z","updated_at":"2024-05-21T19:20:56.000Z","dependencies_parsed_at":"2024-05-28T22:39:05.801Z","dependency_job_id":null,"html_url":"https://github.com/helleworldGIT/SASS-Light-Dark-theme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleworldGIT%2FSASS-Light-Dark-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleworldGIT%2FSASS-Light-Dark-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleworldGIT%2FSASS-Light-Dark-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helleworldGIT%2FSASS-Light-Dark-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helleworldGIT","download_url":"https://codeload.github.com/helleworldGIT/SASS-Light-Dark-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233869025,"owners_count":18743095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","dark","light","mode","sass","scss","scss-directives"],"created_at":"2024-11-14T15:20:13.008Z","updated_at":"2025-09-22T17:31:50.160Z","avatar_url":"https://github.com/helleworldGIT.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SASS-Light-Dark-theme\nThis is an example of how to create a Light/Dark theme project in SASS using @if SASS directive.\n\n## How it works\n\nFirst of all use your console inside the 'css' folder in the project. Type\n```\nsass main.scss:main.css --watch\n```\n\nnow SASS will be looking for changes!\n\nInside the main.scss file you will find a key variable named \"$theme\". This variable only allows 2 values: dark, light.\nDepending in which one you use, the color variables will change to display a 'Light mode' or a 'Dark mode'.\n\n## How it is structured\n\nThis project has 2 level-design-styles as I call them. First level include positions, fonts, font-sizes, etc., every style that doesn't need a color variable. These styles are global and inside mixins.\n\nSecond level design styles involve only color variables and they are the key why Light/Dark mode work.\n\n## The @if directive in SASS\n\nYou can use this directive for any purpose you have in mind. I used it to build this easy-and-fast project of a Dark/Light theme. It usually depends in the value of a variable. It is **a must** to define the allowed values of the variables you'll be using in the @if directive condition.\n\n\u003eFor example, as I defined it in my project:\n```scss\n// Theme variable. Allowed values: 'dark', 'light'. Light by default.\n$theme: light;\n```\n\nKeep in mind that this is a fast way to show your clients a live light/dark mode demonstration of their product.\n\n### You will find me also in\n[Twitter](https://twitter.com/helleworld_) [Behance](https://www.behance.net/desiremcarmona)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelleworldgit%2Fsass-light-dark-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelleworldgit%2Fsass-light-dark-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelleworldgit%2Fsass-light-dark-theme/lists"}