How to style child components from parent component’s CSS file?

Update – Newest Way Don’t do it, if you can avoid it. As Devon Sans points out in the comments: This feature will most likely be deprecated. Last Update From Angular 4.3.0 till even now (Angular 12.x), all piercing css combinators were deprecated. Angular team introduced a new combinator ::ng-deep as shown below, DEMO : … Read more

Remove padding from columns in Bootstrap 3

You’d normally use .row to wrap two columns, not .col-md-12 – that’s a column encasing another column. Afterall, .row doesn’t have the extra margins and padding that a col-md-12 would bring and also discounts the space that a column would introduce with negative left & right margins. <div class=”container”> <div class=”row”> <h2>OntoExplorer<span style=”color:#b92429″>.</span></h2> <div class=”col-md-4 … Read more

How to justify a single flexbox item (override justify-content) [duplicate]

There doesn’t seem to be justify-self, but you can achieve similar result setting appropriate margin to auto¹. E. g. for flex-direction: row (default) you should set margin-right: auto to align the child to the left. .container { height: 100px; border: solid 10px skyblue; display: flex; justify-content: flex-end; } .block { width: 50px; background: tomato; } … Read more

Twitter Bootstrap 3: how to use media queries?

Bootstrap 3 Here are the selectors used in BS3, if you want to stay consistent: @media(max-width:767px){} @media(min-width:768px){} @media(min-width:992px){} @media(min-width:1200px){} Note: FYI, this may be useful for debugging: <span class=”visible-xs”>SIZE XS</span> <span class=”visible-sm”>SIZE SM</span> <span class=”visible-md”>SIZE MD</span> <span class=”visible-lg”>SIZE LG</span> Bootstrap 4 Here are the selectors used in BS4. There is no “lowest” setting in BS4 … Read more

Inline SVG in CSS

Yes, it is possible. Try this: body { background-image: url(“data:image/svg+xml;utf8,<svg xmlns=”http://www.w3.org/2000/svg” width=”10″ height=”10″><linearGradient id=’gradient’><stop offset=”10%” stop-color=”%23F00″/><stop offset=”90%” stop-color=”%23fcc”/> </linearGradient><rect fill=”url(%23gradient)” x=’0′ y=’0′ width=”100%” height=”100%”/></svg>”); } http://jsfiddle.net/6WAtQ/ (Note that the SVG content needs to be url-escaped for this to work, e.g. # gets replaced with %23.) This works in IE 9 (which supports SVG). Data-URLs work … Read more

Opacity of background-color, but not the text [duplicate]

Use rgba! .alpha60 { /* Fallback for web browsers that don’t support RGBa */ background-color: rgb(0, 0, 0); /* RGBa with 0.6 opacity */ background-color: rgba(0, 0, 0, 0.6); /* For IE 5.5 – 7*/ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); /* For IE 8*/ -ms-filter: “progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)”; } In addition to this, you have to declare background: transparent … Read more

How can I write a ‘:hover’ condition for ‘a:before’ and ‘a:after’?

This depends on what you’re actually trying to do. If you simply wish to apply styles to a :before pseudo-element when the a element matches a pseudo-class, you need to write a:hover:before or a:visited:before instead. Notice the pseudo-element comes after the pseudo-class (and in fact, at the very end of the entire selector). Notice also … Read more

Is there a way to use SVG as content in a pseudo element ::before or ::after

Yes you can! Just tested this and it works great, this is awesome! #test::before { content: url(path/to/your.svg); width: 200px; height: 200px; } Or if you prefer to put the SVG directly in the CSS: #test::before { content: url(“data:image/svg+xml,%3Csvg xmlns=”http://www.w3.org/2000/svg”%3E%3Ccircle cx=’100′ cy=’50’ r=”40″ stroke=”black” stroke-width=”2″ fill=”red”/%3E%3Cpolyline points=”20,20 40,25 60,40 80,120 120,140 200,180″ style=”fill:none;stroke:black;stroke-width:3″/%3E%3C/svg%3E “); width: 200px; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)