{"id":15655342,"url":"https://github.com/ericwbailey/styled-component-template","last_synced_at":"2025-05-04T08:33:46.394Z","repository":{"id":57373280,"uuid":"91994734","full_name":"ericwbailey/styled-component-template","owner":"ericwbailey","description":"💅 Help keep your Sass partials consistent","archived":false,"fork":false,"pushed_at":"2020-09-05T18:57:45.000Z","size":11,"stargazers_count":26,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-03T22:35:28.392Z","etag":null,"topics":["component","css","npm","partials","sass"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/sass-component-template","language":null,"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/ericwbailey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-21T23:47:26.000Z","updated_at":"2025-03-30T00:43:43.000Z","dependencies_parsed_at":"2022-08-30T00:12:04.366Z","dependency_job_id":null,"html_url":"https://github.com/ericwbailey/styled-component-template","commit_stats":null,"previous_names":["ericwbailey/sass-component-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericwbailey%2Fstyled-component-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericwbailey%2Fstyled-component-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericwbailey%2Fstyled-component-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericwbailey%2Fstyled-component-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericwbailey","download_url":"https://codeload.github.com/ericwbailey/styled-component-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252309136,"owners_count":21727318,"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":["component","css","npm","partials","sass"],"created_at":"2024-10-03T12:58:18.780Z","updated_at":"2025-05-04T08:33:46.359Z","avatar_url":"https://github.com/ericwbailey.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Styled Component Template\n\nA collection of templates to help create consistent, performant component styling for CSS and most major CSS preprocessors.\n\n## Comment Detail\n\nThe ordering of these is intentional. These groupings leverage the cascade to make the partials as efficient as possible.\n\nThe comments below link to [the Sass partial](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss) for reference, but apply to every template.\n\n- [`01`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L1) Provides an 80 character-wide column marker\n- [`02`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L2) Category type: Layout, Object, Component, Theme, etc.\n- [`03`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L3) This is the partial's name spelled out as a proper noun\n- [`04`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L4) A link to the partial on a living styleguide, if available\n- [`08`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L8) Use this comment block to provide any high level background information about the partial. Can span multiple lines, is constrained to an 80 character-long width. May be replaced with [SassDoc](http://sassdoc.com/)\n- [`13`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L13) Update to reflect the component's type and name. For example, a layout partial's class name would be called `.l-sidebar`\n- [`14`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L14) [Encapsulated logic](https://www.devbridge.com/articles/7-sass-techniques-to-help-you-write-better-code/) prevents unpredictable behavior\n- [`15`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L15) Variables can be used for all subsequent logic\n- [`19`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L19) Use extends with [a healthy dose of discretion](http://csswizardry.com/2016/02/mixins-better-for-performance/)\n- [`21`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L21) Group properties alphabetically by intent. Use an empty space between each property grouping for easier scanning\n- [`26`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L26) `cursor`, `transition`, etc.\n- [`28`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L28) Pseudo classes can inform pseudo elements, therefore they come first\n- [`37`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L37) Use HTML (ex: `[hidden]`) and ARIA (ex: `[aria-busy=\"true\"]`) attributes to provide [meaningful, semantic states](https://css-tricks.com/user-facing-state/)\n- [`39`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L39) Use Sass' ampersand selector to modify the partial's presentation based on a class declared higher up in the DOM. This is useful for theming and modifying behavior based on state. Ex: `.t-dark \u0026 { … }`\n- [`42`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L42) Although [`@supports`](https://www.lottejackson.com/learning/supports-will-change-your-life) is technically not a media query, it is very similar behavior-wise\n- [`43`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L43) Feature queries include Reduced Motion, High Contrast Mode, etc.\n- [`44`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L44) Be sure to develop partials mobile first. I find a library like [mappy-breakpoints](https://github.com/zellwk/mappy-breakpoints) helps to manage breakpoints and tweakpoints. After declaring a breakpoint, be sure to follow this template's ordering within the breakpoint\n- [`46`](https://github.com/ericwbailey/styled-component-template/blob/master/dist/_type.name.scss#L46) Sass' ampersand selector works really well with a BEM naming methodology. Be sure be sure to follow this template's ordering within the nested selectors. Try not to nest selectors more than 3 deep—if you find yourself doing so, you can probably refactor\n\n\n## Notes\n- I prefer to use a comment as a subsection heading. I find it helps making scanning the file easier","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericwbailey%2Fstyled-component-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericwbailey%2Fstyled-component-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericwbailey%2Fstyled-component-template/lists"}