What is @apply in CSS?

the simple way of explaining it would be; introducing variables into css (which is a feature of preprocessors such as sass), and mixins which are function like behaviors (also in preprocessors). imagine that –header-theme is a function (mixin) :root { –header-theme: { color: red; font-family: cursive; font-weight: 600; }; } h1 { @apply –header-theme; } … Read more

Forcing child to obey parent’s curved borders in CSS

According to the specs: A box’s backgrounds, but not its border-image, are clipped to the appropriate curve (as determined by ‘background-clip’). Other effects that clip to the border or padding edge (such as ‘overflow’ other than ‘visible’) also must clip to the curve. The content of replaced elements is always trimmed to the content edge … Read more

What is the difference between CSS and SCSS?

In addition to Idriss answer: CSS In CSS we write code as depicted bellow, in full length. body{ width: 800px; color: #ffffff; } body content{ width:750px; background:#ffffff; } SCSS In SCSS we can shorten this code using a @mixin so we don’t have to write color and width properties again and again. We can define … Read more

How to make Twitter bootstrap modal full screen

I achieved this in Bootstrap 3 with the following code: .modal-dialog { width: 100%; height: 100%; margin: 0; padding: 0; } .modal-content { height: auto; min-height: 100%; border-radius: 0; } In general, when you have questions about spacing / padding issues, try right+clicking (or cmd+clicking on mac) the element and select “inspect element” on Chrome … Read more

How to draw a circle with text in the middle?

Setting a line-height the same value as the height of the div will show one line of text vertically centered. In this example the height and line-height are 500px. Example JSFiddle .circle { width: 500px; height: 500px; line-height: 500px; border-radius: 50%; font-size: 50px; color: #fff; text-align: center; background: #000 } <div class=”circle”>Hello I am A … Read more

CSS @font-face not working with Firefox, but working with Chrome and IE

LOCALLY RUNNING THE SITE (file:///) Firefox comes with a very strict “file uri origin” (file:///) policy by default: to have it to behave just as other browsers, go to about:config, filter by fileuri and toggle the following preference: security.fileuri.strict_origin_policy Set it to false and you should be able to load local font resources across different … Read more

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