{"id":21829704,"url":"https://github.com/0xtlt/bracketcss","last_synced_at":"2026-04-29T16:05:57.334Z","repository":{"id":57148803,"uuid":"257899518","full_name":"0xtlt/bracketcss","owner":"0xtlt","description":"BracketCSS is not like LESS or SASS with functions, it is design for web responsive with variables and media queries","archived":false,"fork":false,"pushed_at":"2020-08-09T17:29:20.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-26T17:53:04.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/0xtlt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-22T12:48:03.000Z","updated_at":"2021-03-03T16:15:42.000Z","dependencies_parsed_at":"2022-08-31T20:02:37.345Z","dependency_job_id":null,"html_url":"https://github.com/0xtlt/bracketcss","commit_stats":null,"previous_names":["thomast404/bracketcss"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xtlt/bracketcss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fbracketcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fbracketcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fbracketcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fbracketcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xtlt","download_url":"https://codeload.github.com/0xtlt/bracketcss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xtlt%2Fbracketcss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32432953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-27T18:28:50.414Z","updated_at":"2026-04-29T16:05:57.319Z","avatar_url":"https://github.com/0xtlt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BracketCSS :sparkles:\n\nBracketCSS is designed for web responsive with variables, media queries and now functions !\n\n## Installation 🌍\n\n    $ npm install bracketcss\n\n## How it works ?\n\nInitialize\n\n```javascript\nconst bracketcss = require(\"bracketcss\");\n\nconst result = bracketcss(`bracketcss code...`);\n```\n\n## Define variable\n\nLike SCSS you can use the \\$ expression\n\n```scss\n$color: blue;\n```\n\n## Use Variable\n\n```scss\ncolor: ${color};\n```\n\n## Define multiple media queries\n\nThis (BracketCSS) :\n\n```scss\n@media screen and max-width: [1920px, 1024px, 778px] {\n  p {\n    color: [red, green, blue];\n    content: \"\\n\";\n\n    strong {\n      font-weight: bold;\n    }\n  }\n}\n```\n\nBecome (CSS) :\n\n```css\n@media screen and (max-width: 1920px) {\n  p {\n    color: red;\n    content: \"\\n\";\n  }\n  p strong {\n    font-weight: bold;\n  }\n}\n@media screen and (max-width: 1024px) {\n  p {\n    color: green;\n    content: \"\\n\";\n  }\n  p strong {\n    font-weight: bold;\n  }\n}\n@media screen and (max-width: 778px) {\n  p {\n    color: blue;\n    content: \"\\n\";\n  }\n  p strong {\n    font-weight: bold;\n  }\n}\n```\n\n## Define function\n\nFunctions are written in javascript but defined with the `fnc` keyword\n\n```javascript\nfnc componentToHex(c) {\n  let hex = c.toString(16);\n  return hex.length == 1 ? \"0\" + hex : hex;\n}\n\nfnc rgbToHex(r, g, b) {\n  return \"#\" + componentToHex(r) + componentToHex(g) + componentToHex(b);\n}\n```\n\n## Use function\n\nYou can use the variable system in functions\n\n```scss\n$size: 12px;\n$red: 255;\n\np {\n    font-size: ${size};\n    color: rgbToHex(${red}, 10, 35);\n}\n\n@media screen and max-width: [1024px, 778px] {\n    p {\n        font-size: [14px, 15px];\n        color: [red(), blue()];\n\n        strong {\n            color: [rgbToHex(${red}, 10, 35), rgbToHex(${red}, 250, 35)];\n        }\n    }\n}\n```\n\n## Pre-Built functions\n\nLighten\nhex, percent (0 - 100)\n\n```scss\ncolor: lighten(#21eae3, 20);\n```\n\nDarken\nhex, percent (0 - 100)\n\n```scss\ncolor: darken(#21eae3, 20);\n```\n\nOpacify\nhex, percent (0 - 1)\n\n```scss\ncolor: opacify(#21eae3, 0.2);\n```\n\nHex To RGB\nhex\n\n```scss\ncolor: hexToRGB(#21eae3);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtlt%2Fbracketcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xtlt%2Fbracketcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xtlt%2Fbracketcss/lists"}