Title: CSS specificity/order problem · Issue #11 · ByteGrad/Professional-CSS-Course · GitHub
Open Graph Title: CSS specificity/order problem · Issue #11 · ByteGrad/Professional-CSS-Course
X Title: CSS specificity/order problem · Issue #11 · ByteGrad/Professional-CSS-Course
Description: Hi, I have encountred problem I am not able to solve. I have followed your first course of CSS and then experiment on it on topic of specificty and order of classes and figuring out what is being overriden and I encountered following beh...
Open Graph Description: Hi, I have encountred problem I am not able to solve. I have followed your first course of CSS and then experiment on it on topic of specificty and order of classes and figuring out what is being o...
X Description: Hi, I have encountred problem I am not able to solve. I have followed your first course of CSS and then experiment on it on topic of specificty and order of classes and figuring out what is being o...
Opengraph URL: https://github.com/ByteGrad/Professional-CSS-Course/issues/11
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CSS specificity/order problem","articleBody":"Hi,\r\n\r\nI have encountred problem I am not able to solve.\r\nI have followed your first course of CSS and then experiment on it on topic of specificty and order of classes and figuring out what is being overriden and I encountered following behavior.\r\n\r\nI created circle class that just says circle should be red. But it always overrides the second class, where the white is defined. Both classes (even in DevTools) have specificity (0, 1, 0) and so order should matter now - but its not for me. Here is the code snippet\r\n\r\n/* HTML SNIPPET */\r\n\u003cdiv class=\"canvas__circle circle--white circle--red\"\u003e\u003c/div\u003e\r\n\u003cdiv class=\"canvas__circle circle--red circle--white\"\u003e\u003c/div\u003e\r\n\r\n/* STYLES SNIPPET */\r\n.canvas__circle {\r\n height: 15px;\r\n width: 15px;\r\n border-radius: 50%;\r\n position: absolute;\r\n animation: fade-in 1s 1s backwards;\r\n}\r\n\r\n.circle--white {\r\n background-color: #fff;\r\n}\r\nC:\\ProjectsFila\\_bytegrad\\SocialEditor\\index.html\r\n.circle--red {\r\n background-color: rgb(255, 0, 0);\r\n}\r\n\r\nNo other styles are interfering there (red is only specified in circle--red in my project).\r\n\r\nDo you have any idea why I see such behavior? This is quite serious problem for me because I for example need to use in my react custom components \u003chtmlElement className = {\"myClassName \" + this.props.className } but now I am not sure if the properties of custom styles will correctly override component default style.\r\n\r\n\r\nThank you in advance for any kind of help/advice.\r\n\r\nHave a great day!\r\nFilip","author":{"url":"https://github.com/FilipXSv","@type":"Person","name":"FilipXSv"},"datePublished":"2024-02-10T20:15:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/11/Professional-CSS-Course/issues/11"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ab6d9d36-71d8-9f38-43a4-0b3cb0938331 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FAA:6E5C4:B8A32F:FA36E0:6A5164B3 |
| html-safe-nonce | 511f9351ef8079363082698aff9f85e522accaa19b45e518fb35f9ff491c58ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkFBOjZFNUM0OkI4QTMyRjpGQTM2RTA6NkE1MTY0QjMiLCJ2aXNpdG9yX2lkIjoiNjQ2MDE3NDM3NzQzODc2NjI1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6bf0ed0e029d43c08b7cf9c865e3fb164fc97c9c54389f1664419c509717385e |
| hovercard-subject-tag | issue:2128701037 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ByteGrad/Professional-CSS-Course/11/issue_layout |
| twitter:image | https://opengraph.githubassets.com/15617b1fe74ce1e4ac70a8ff3ecce7d1d1f4ca5cac061f6c56e9841bf97b9134/ByteGrad/Professional-CSS-Course/issues/11 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/15617b1fe74ce1e4ac70a8ff3ecce7d1d1f4ca5cac061f6c56e9841bf97b9134/ByteGrad/Professional-CSS-Course/issues/11 |
| og:image:alt | Hi, I have encountred problem I am not able to solve. I have followed your first course of CSS and then experiment on it on topic of specificty and order of classes and figuring out what is being o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FilipXSv |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/ByteGrad/Professional-CSS-Course git https://github.com/ByteGrad/Professional-CSS-Course.git |
| octolytics-dimension-user_id | 82057865 |
| octolytics-dimension-user_login | ByteGrad |
| octolytics-dimension-repository_id | 367457475 |
| octolytics-dimension-repository_nwo | ByteGrad/Professional-CSS-Course |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 367457475 |
| octolytics-dimension-repository_network_root_nwo | ByteGrad/Professional-CSS-Course |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2eeb434949a926fad21064b4d395a54759f7a0b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width