CSS – Add Color with a data attribute – attr(data-color color)

You can pass css values from html: <button style=” –tooltip-string: ‘Ug. Tooltips.’; –tooltip-color: #f06d06; –tooltip-font-size: 11px; –tooltip-top: -10px”> Button </button> to css: button::after { content: var(–tooltip-string); color: var(–tooltip-color); font-size: var(–tooltip-font-size); } source: https://css-tricks.com/css-attr-function-got-nothin-custom-properties/ codepen: https://codepen.io/chriscoyier/pen/EbxVME

Selecting an element that doesn’t have a child with a certain class

:not(:has()) Note: Limited support for old browsers. The example below demonstrates the combination of the :not() and :has() pseudo-classes to select elements that do not have a specified child. div:not(:has(p)) { background: powderblue; } div:not(:has(p)):hover { color: blue; background: azure; } <div> <h1>Does Not Have a Paragraph</h1> </div> <div> <h1>Has a Paragraph</h1> <p>Paragraph</p> </div> As … Read more

Cross-Origin Request Blocked when loading local file

Firefox 68 contains a security patch which restricts the kinds of files that pages can load (and methods of loading) when you open them from a file:// URL. This change was made to prevent exfiltration of valuable data within reach of a local page, as demonstrated in an available exploit. More info: https://developer.mozilla.org/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp I filed … Read more

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0 [duplicate]

Using / to make divisions outside of calc function won’t be supported anymore. Here is an overview of the reason why form the documentation: Sass currently treats / as a division operation in some contexts and a separator in others. This makes it difficult for Sass users to tell what any given / will mean, … Read more

CSS opacity gradient?

You can do it in CSS, but there isn’t much support in browsers other than modern versions of Chrome, Safari and Opera at the moment. Firefox currently only supports SVG masks. See the Caniuse results for more information. EDIT: all browsers except IE now support all mask- properties mentioned here. CSS: p { color: red; … Read more

Make absolute child full length inside a scrollable container

You need to wrap the text in a div element and include the absolutely positioned element inside of it. <div class=”container”> <div class=”inner”> <div class=”full-height”></div> [Your text here] </div> </div> Css: .inner: { position: relative; height: auto; } .full-height: { height: 100%; } Setting the inner div’s position to relative makes the absolutely position elements … Read more

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