{"id":13746583,"url":"https://github.com/Idered/cssParentSelector","last_synced_at":"2025-05-09T07:30:53.230Z","repository":{"id":58219614,"uuid":"2202286","full_name":"Idered/cssParentSelector","owner":"Idered","description":"CSS4 parent selector based on jQuery","archived":false,"fork":false,"pushed_at":"2015-03-05T00:13:56.000Z","size":282,"stargazers_count":214,"open_issues_count":16,"forks_count":38,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-09T01:07:28.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Idered.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-13T16:45:26.000Z","updated_at":"2025-02-14T15:49:54.000Z","dependencies_parsed_at":"2022-08-31T03:01:15.925Z","dependency_job_id":null,"html_url":"https://github.com/Idered/cssParentSelector","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/Idered%2FcssParentSelector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2FcssParentSelector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2FcssParentSelector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idered%2FcssParentSelector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Idered","download_url":"https://codeload.github.com/Idered/cssParentSelector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253209277,"owners_count":21871623,"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":[],"created_at":"2024-08-03T06:00:56.165Z","updated_at":"2025-05-09T07:30:49.133Z","avatar_url":"https://github.com/Idered.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"# [DEPRECATED]\n\n# What is cssParentSelector\n\ncssParentSelector is a polyfill based on [jQuery](http://jquery.com/) that allows you to use parent selector in CSS.\n\n## License\n\nReleased under MIT and GPL licenses.\n\n## Installation\n\nJust attach this plugin to your code and that's all.\n\n    \u003cscript src=\"jQuery.cssParentSelector.js\"\u003e\u003c/script\u003e\n\n## Usage\n\n    parent! target \u003e child:state\n\n### Quick info about parent selector in CSS4\n\n! - determines subject of selector according to [CSS4 reference](http://dev.w3.org/csswg/selectors4/)\n\nE \u003e F - selects an F element, child of E\n\nE! \u003e F - selects an E element, parent of F\n\n### Parent\n\nAny vaild selector is okey, id, class, even like this one: input[type=checkbox]\n\n### Target\n\nThis is optional, after we've got PARENT of our CHILD selector, we look for this TARGET element within PARENT.\n\n### Child\n\nBased on this, we select PARENT element.\n\n### State\n\nAs for now plugin supports:\n\n* changed, selected\n* checked\n* focus\n* hover\n* click\n* dblclick\n* active\n\n## Sample\n\n```html\n  \u003cdiv id=\"container\"\u003e\n    \u003cp\u003e\n      \u003clabel\u003eChange value and click somewhere\u003c/label\u003e\n      \u003cinput type=\"text\" name=\"name\" placeholder=\"Value\" class=\"dotted\"\u003e\n      \u003cspan class=\"message\"\u003eYay, you've changed value.\u003c/span\u003e\n    \u003c/p\u003e\n\n    \u003cp class=\"custom\"\u003e\n      \u003cinput type=\"checkbox\" name=\"name\" placeholder=\"Value\" class=\"dashed\"\u003e\n      \u003cspan class=\"message\"\u003eYay, you've checked.\u003c/span\u003e\n    \u003c/p\u003e\n\n    \u003cp\u003e\n      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\n      tempor incididunt ut labore et dolore magna aliqua.\n      \u003ca href=\"#\" class=\"hide-parent\"\u003e\u0026#x2716;\u003c/a\u003e\n    \u003c/p\u003e\n  \u003c/div\u003e\n```\n\n```css\n/* Select paragraph parent of input or a*/\np! \u003e input, p! \u003e a { border: 1px solid #ccc; padding: 10px 5px; }\n\n/* Select any parent of input or a*/\n*! \u003e input, p! \u003e a { background: #fafafa; }\n\n/* Select any parent with class of input */\n*.custom! \u003e input { background: #f5f5f5; }\n\n/* Select any parent with class of input */\n#container! \u003e p { background: #eee; }\n\n/* Select any parent of input with class */\n*! \u003e input.dotted { border-style: dotted; }\n*! \u003e input.dashed { border-style: dashed; }=\n\n/* En empty declaration, just for tests */\n*! \u003e p {\n\n}\n\n/* Hide an message box */\n.hide-parent { float: right; }\np! \u003e .hide-parent:click { display: none; /* Comment inside declaration */ }=\n\n/* Select any parent of input which value was changed */\np! \u003e input:changed { background: #EEDC94; }\n\n/* Select label within parent of focused text input */\np! label \u003e input[type=text]:focus{ display: block; }\n\n/* Select element with definied class within parent of changed/checked text/checkbox input */\np! .message \u003e input[type=text]:changed,\np! .message \u003e input[type=checkbox]:checked {\n    display: inline;\n}\n\np! span:first-child\u003e input { display: block; }\np:after! \u003e input {\n  display: block;\n  width: 100%;\n  height: 1px;\n  background-color: #111;\n}\n```\n\n## Changelog\n\n* **1.0.9** - *09.09.2012 *\n  * Added support for images in css bacground property (// in image link was interpreted as comment)\n  * Minified version\n\n* **1.0.8** - *07.02.2012 *\n  * Added support for pseudo classes (after, before, first-child, last-child, nth-child(), active and anything that jquery filter function can handle)\n  * Added !important to all declarations.\n\n* **1.0.7** - *21.01.2012*\n  * Now before matchig css for definied regex we strip comments\n  * Empty declarations are omitted\n  * Better regex\n  * Optimized code\n\n* **1.0.6** - *18.01.2012*\n  * Changed structure to the one described in CSS4 reference\n  * Improved performance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIdered%2FcssParentSelector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIdered%2FcssParentSelector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIdered%2FcssParentSelector/lists"}