{"id":24650818,"url":"https://github.com/correct-syntax/ui-style-lang","last_synced_at":"2025-10-07T10:30:29.589Z","repository":{"id":46752600,"uuid":"267696517","full_name":"Correct-Syntax/ui-style-lang","owner":"Correct-Syntax","description":"CSS-like style language for drawing and styling elements in wxPython","archived":false,"fork":false,"pushed_at":"2023-11-06T18:56:21.000Z","size":8705,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T19:33:13.030Z","etag":null,"topics":["css","gui","language","python","stylesheet","ui-design","ui-style","wxpython"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Correct-Syntax.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}},"created_at":"2020-05-28T21:05:21.000Z","updated_at":"2024-10-28T18:02:31.000Z","dependencies_parsed_at":"2022-08-26T03:31:57.089Z","dependency_job_id":null,"html_url":"https://github.com/Correct-Syntax/ui-style-lang","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/Correct-Syntax%2Fui-style-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Correct-Syntax%2Fui-style-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Correct-Syntax%2Fui-style-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Correct-Syntax%2Fui-style-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Correct-Syntax","download_url":"https://codeload.github.com/Correct-Syntax/ui-style-lang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235614247,"owners_count":19018405,"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","gui","language","python","stylesheet","ui-design","ui-style","wxpython"],"created_at":"2025-01-25T18:16:44.329Z","updated_at":"2025-10-07T10:30:24.037Z","avatar_url":"https://github.com/Correct-Syntax.png","language":"Python","readme":"![\"UI Style Lang\"](https://github.com/Correct-Syntax/ui-style-lang/blob/master/assets/logo.png?raw=true \"UI Style Lang\")\n\n[![Documentation Status](https://readthedocs.org/projects/ui-style-lang/badge/?version=latest)](https://ui-style-lang.readthedocs.io/en/latest/?badge=latest)\n\nUI Style Lang is a simple CSS-like language which allows for drawing and styling wxPython elements. Many UI Style Lang properties are the same as the normal (not short-hand) CSS3 properties. This provides a familiar syntax, especially for those with experience with CSS3.\n\nIf you are looking for an easy way to:\n\n* **Draw shapes, text and/or images** in wxPython without worrying so much about ids, brushes, pens, etc.\n* **Style the native wxPython widgets** from a stylesheet\n* **Create your own custom widgets in wxPython** that can be styled with a CSS-like stylesheet\n\nthen UI Style Lang is likely the module you're looking for.\n\n\n## Background\n\nThis was originally created as a \"scratch-an-itch\" project to get an idea I had for using the wxPython drawing API in a CSS way out of my head. Whether or not this is a good idea I don't know, but it's fun creating it.\n\n\n## Features\n\n* **Written in pure Python with just wxPython and the standard library**\n\n* **Drawing API**\n    * Includes the ``UIStylePDC`` UI Style Lang class which is a powerful extension of the wxPython ``wx.PseudoDC``\n    * Over 15 stylesheet properties already supported\n    * Draw circles, rectangles, squares, images, \u0026 text\n    * Translate \u0026 rotate elements\n    * Load styles from inline styles, string and/or an external stylesheet\n    * Auto-handles wxPython IDs, with support for manual-handling of IDs\n\n* **Native Widget Styling API**\n    * Supports loading from a stylesheet for easy theming\n    * Support for styling app, panels, frames and static text widgets\n\nand more.\n\n\n## Usage and Examples\n\nSee the [documentation](https://ui-style-lang.readthedocs.io/en/latest/) at Read the Docs and [full demo examples](https://github.com/Correct-Syntax/ui-style-lang/tree/master/demo) for information on usage.\n\n\n## What does the syntax look like?\n\nUI Style Lang (Stylesheet API) example:\n\n```\n/* My custom button styles */\n@style button {\n  background-color: #F4F4F4;\n  top: 20px;\n  left: 40px;\n  width: 115px;\n  height: 35px;\n  border-color: #D1D1D1;\n  border-size: 2px;\n}\n\n@style button:hover {\n  background-color: #FDFDFD;\n  top: 20px;\n  left: 40px;\n  width: 115px;\n  height: 35px;\n  border-color: #D1D1D1;\n  border-size: 2px;\n}\n```\n\nPython API example:\n\n```python\n\n# Intilizing the element: \u003cdiv id=\"button\"\u003e\u003c/div\u003e\n\u003e\u003e dc.InitElem(\"button\")\n\n# Editing the style with inline styles: \u003cdiv id=\"button\" style=\"border-color: red; border-width: 4px;\"\u003e\u003c/div\u003e\n\u003e\u003e dc.UpdateElem('button', styles=\"border-color: red; border-width: 4px;\")\n\n# Update the element with the 'hover' styles: \u003cdiv id=\"button\" class=\"hover\"\u003e\u003c/div\u003e\n\u003e\u003e dc.UpdateElem('button:hover')\n\n```\n\n\n## Contributing\n\nIf you would like to help out or have ideas, feel free to open a Github issue.\n\nPull requests and/or feature suggestions are welcome!\n\n\n## License\n\nUI Style Lang is licensed under the BSD 3-Clause license.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrect-syntax%2Fui-style-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorrect-syntax%2Fui-style-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrect-syntax%2Fui-style-lang/lists"}