Making your CSS Custom Properties Dynamic!

Making your CSS Custom Properties Dynamic!

DesignCourse

5 лет назад

50,407 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@DesignCourse
@DesignCourse - 22.07.2019 16:29

Want more? Subscribe up already! Sheesh!

Ответить
@AjayKumar-gg4ds
@AjayKumar-gg4ds - 30.03.2023 11:00

Awesome❤

Ответить
@dailymeow3283
@dailymeow3283 - 07.01.2022 20:03

I wanted to set a css variable to keyframes snd animate it but it didn't work .. i guess i'll make a for loop with setTimeout every 10ms to set the css variable

Ответить
@frosty1433
@frosty1433 - 03.07.2021 21:02

Make it work with pointer events.

Ответить
@snbhawani
@snbhawani - 30.04.2021 18:26

thanks i am searching for this and when i see i feel so good thanks sir very much

Ответить
@ddrweb_
@ddrweb_ - 18.03.2021 15:57

so the whole purpose of this video is that you can use js to change js or use your brain?

Ответить
@AndrewTSq
@AndrewTSq - 18.03.2021 08:36

Why sass? It says css in topic.

Ответить
@hamletpena1191
@hamletpena1191 - 27.11.2020 01:19

Hello i was watching this video an i am trying to change the gradient's parameter dynamically fron circle to linear or viseversa using a select button my question is how can i change this part of the code in css from angular ? there is a way to create css variable from angular components? greettings.

Ответить
@celestialhand8544
@celestialhand8544 - 09.11.2020 12:55

This just helped me a ton. Thanks!

Ответить
@mackynikat8833
@mackynikat8833 - 20.09.2020 06:39

I really like this guy. He only features content that were me might encounter soon that's really important. Sir. Hope you will cover in your content about image dispersion. Having trouble in html2canvas

Ответить
@BloodyClash
@BloodyClash - 17.07.2020 17:23

Wouldn't it be much easier to call the css file style.css.php and handle all variables with php ? It even can handle styles from a database that way (you can set in the html file <link rel="stylesheet" href="css/style.css.php"> and since the php interpreter is obsessed it first will compile and then spit out the css)

Ответить
@harshareddy8020
@harshareddy8020 - 31.12.2019 09:47

Will it work in IE browser

Ответить
@yolo-mb4cy
@yolo-mb4cy - 09.10.2019 15:18

You can use document.body to get body instead of querySelector

Ответить
@rohitkudalkar92
@rohitkudalkar92 - 06.10.2019 10:16

Very useful thanks.

Ответить
@cristianannese6040
@cristianannese6040 - 28.07.2019 04:29

nice and concise tutorial. Thanks man!

Ответить
@Neduniv
@Neduniv - 27.07.2019 18:57

My onclick function is not working. The red box just stays the same red box. Do you have any insight on that?

Ответить
@socialmediapanama
@socialmediapanama - 27.07.2019 17:17

MegaLike! tnks!

Ответить
@avijitghosh9472
@avijitghosh9472 - 26.07.2019 13:02

Awesome video!

Ответить
@soul.rebel1986
@soul.rebel1986 - 26.07.2019 03:42

Awesome!

Ответить
@webgirljenn6212
@webgirljenn6212 - 25.07.2019 17:39

Love to hear of appropriate use cases for these and also issue with accessibility and across browsers.

Ответить
@rudrapratapsinha8880
@rudrapratapsinha8880 - 25.07.2019 09:52

no

Ответить
@juanluisclaure6485
@juanluisclaure6485 - 25.07.2019 05:22

this one is an example of a badass technique, thanks for sharing. Saludos from Bolivia

Ответить
@prakashale1627
@prakashale1627 - 25.07.2019 01:40

Really cool stuff

Ответить
@MrTuyen-um6lf
@MrTuyen-um6lf - 24.07.2019 18:12

Cool

Ответить
@100vermillion
@100vermillion - 24.07.2019 06:27

hi simon! sometimes you should play guitars for us

Ответить
@nazmusas
@nazmusas - 24.07.2019 04:36

great video, thanks!

Ответить
@johnernest8109
@johnernest8109 - 24.07.2019 04:04

Oh man, thank you this is very useful. 

I needed this the other day because scss variables cascade, which in some cases is not what you want, and I wanted to do something like... calc(100% - 40px) on a div for an image and then set the div height based on the aspect ratio of the image, but the variable cascades so I couldn't do it in pure css.

On the video is it possible to update x and y on .card with the pointer events enabled?

Ответить
@juliohintze595
@juliohintze595 - 23.07.2019 23:59

That's actually very helpful! Instead of changing the whole background css property, we can just change the variables :O

Ответить
@thomasersosi4595
@thomasersosi4595 - 23.07.2019 20:50

Instead of disabling the pointer-events for the child-elements in css, how about referencing the correct element in the code? `e.currentTarget`

Ответить
@turculaurentiu91
@turculaurentiu91 - 23.07.2019 20:40

Why am I doing this instead of composing the gradient function directly from javascript? I know it makes it simpler somehow, but you can make a function in js to compose it too...

Ответить
@stefanbogdanovic590
@stefanbogdanovic590 - 23.07.2019 19:13

Awesome didn't know this is possible to pass dynamic value to css. Nice video broo thank you for sharing this 😁👍

Ответить
@siddhantjain2402
@siddhantjain2402 - 23.07.2019 18:33

Really loving the new background.

Ответить
@isatsoftwaresolutions6220
@isatsoftwaresolutions6220 - 23.07.2019 16:48

You rocked design course ❤

Ответить
@cuervo30509
@cuervo30509 - 23.07.2019 15:28

thank you!

Ответить
@jasbindarsingh3417
@jasbindarsingh3417 - 23.07.2019 10:09

Simple and Concise, close to the content and not other bs.
+1

Ответить
@odirleypinheiro
@odirleypinheiro - 23.07.2019 05:06

Awesome!!!

Ответить
@apabego
@apabego - 23.07.2019 04:21

give default value —y:0px; —x:0px;

Ответить
@ShadiMuhammad
@ShadiMuhammad - 23.07.2019 03:44

That's AWESOME. 😍
Good Job Gary. 👌

Ответить
@toybeaver
@toybeaver - 23.07.2019 03:12

I love how your camera looks like when I put too much padding on my centered element

Ответить
@juancamilonarvaezsandoval7969
@juancamilonarvaezsandoval7969 - 23.07.2019 00:10

blow mind :o

Ответить
@SteveRB511
@SteveRB511 - 22.07.2019 23:28

My problem with the code not working was using single quotes instead of backticks for the ${ ... }px expressions -- I missed that when initially going through the code. This was the first time I've ever heard of using backticks in JavaScript and the first time I've heard of Template literals (string literals allowing embedded expressions) with which they are used. Hope this is useful to some.

Ответить
@piotrzakrzewski5643
@piotrzakrzewski5643 - 22.07.2019 22:24

Any idea how to make it work with pointer events on? cause this looks like cool ide for some CTA elements end so on, but without pointer events thats wont do mutch. thanx

Ответить
@dimtodim
@dimtodim - 22.07.2019 21:47

i cant understand people who click on dislike button

Ответить
@hardcodd
@hardcodd - 22.07.2019 21:28

So cool, man!

Ответить
@edwardtofan1800
@edwardtofan1800 - 22.07.2019 21:27

That's one helluva lesson there Gary. :) <3

Ответить