PB101: L19 - Dynamic Styling with Data Attributes & Attribute Selectors

  Рет қаралды 7,593

Kevin Geary

Kevin Geary

8 ай бұрын

There are going to be situations where you need to be able to target elements based on specific data associated with those elements. Or, target elements based on specific attributes that they have.
Know what this means? It means all the methods you've previously learned about selecting and styling elements (classes, IDs, programmatic selection with pseudo-classes, etc.) will all fail you in these situations.
So, there's one more technique that you need to learn: data attributes. And along with that, we need to talk about how the attribute selector works. I'll even show you some incredible superpowers that come along with the attribute selector.
That's not all, though. You'll also learn how to display data from data attributes using the attr() function and get a glimpse of how data attributes empower more efficient JS interactions in web design.
It's another packed training session that's going to greatly elevate you above beginner/intermediate level.
Enjoy!
** MY TOOLS **
🔥 AutomaticCSS (ACSS) - automaticcss.com
🔥 Frames - getframes.io
See all my recommended tools here: geary.co/tools/
** INNER CIRCLE **
Step your design/dev game up, make more money, and get the full scoop on scaling your digital agency! When it comes to the Inner Circle, I don't hold back.
⭕ In-depth design & dev trainings
⭕ Business, sales, & marketing trainings
⭕ Agency resources & downloadables
⭕ Vibrant, quality community with zero toxicity
⭕ ...and much more!
Learn more and join here: geary.co/inner-circle/
** SOCIAL **
👉 FB - / marketingkev
👉 LinkedIn - / kevingeary
** CHAPTERS **

Пікірлер: 106
@ReubenHochstetler
@ReubenHochstetler 8 ай бұрын
This course is incredible for anyone wanting to level up their web development. It's not just for beginners.
@jcdeaton42
@jcdeaton42 6 ай бұрын
Awesome course! I finished it in 4 days 😂. This course is great for any skill level. I learned best practices for things I’ve done wrong for 25 years. Thanks Kevin.
@jeremya3037
@jeremya3037 8 ай бұрын
This is one of the best episodes yet. Thanks for creating this video.
@VigneshMukund
@VigneshMukund 2 ай бұрын
You are an incredible teacher, Kevin! I can't believe I learnt all of this for FREE! Thank you. You have earned yourself a supporter. :)
@matthewolding9427
@matthewolding9427 8 ай бұрын
Absolute gold! Every PB101 has been value packed. Thank you!
@olafurgumundsson6475
@olafurgumundsson6475 8 ай бұрын
This is like striking gold after a long and frustrating search.
@rickdugmore
@rickdugmore 7 ай бұрын
I'm a changed man. Thank you. Am I in love or just infatuated? Not sure yet, time will tell. But seriously, I run an SEO agency and always tried to avoid website design because of the monotonous tasks involved with it. But now I think i will start to enjoy website building again and now even look forward to it. I believe I can charge way more now. Thank you again.
@clausmorlock
@clausmorlock 8 ай бұрын
Switched to Bricks not long ago. Currently working on my first website trying to follow the best practices I learned in this course. It's a challenge, I have to admit, but sets the bar for the level I wanna work on. The value you provide with PB101 is awesome. Thank you so much for that
@Gearyco
@Gearyco 8 ай бұрын
It takes practice. But it will quickly become second nature!
@chrisgreen5711
@chrisgreen5711 8 ай бұрын
Another outstanding tutorial Kevin. A very big thank you for doing all these - unbelievably valuable
@rafikiAli
@rafikiAli 5 ай бұрын
Left each video with a value of "Like" i. Going back to the beginning for round 2 with more practice executions! I can actually feel my net worth increasing exponentially! TY!
@Gearyco
@Gearyco 5 ай бұрын
💰get that bag!
@zdenekholy2634
@zdenekholy2634 8 ай бұрын
Ah, ah ... this is what I was craving for. Attributes and custom queries. Till now it was just all black magic to me ... but I see I was wrong :) Great tutorial Kevin. Can't wait what L20 will bring ... it's getting better & better.
@serendipidy
@serendipidy 4 ай бұрын
I binge-watched this course in the last week and am just blown away that this course is for free. No one gives knowledge away like that for free. This is one of a kind. Am gob-smacked. I shared this course and hopefully, a lot of people will watch it. I am thinking of joining the Inner Circle now.
@Gearyco
@Gearyco 4 ай бұрын
I appreciate you!
@AthloneH
@AthloneH 8 ай бұрын
Incredible value in EACH lesson. I can't recommend this course highly enough for anyone wanting to level up their skills.
@davidwalls2304
@davidwalls2304 8 ай бұрын
Kevin, I've seen you use data attributes in other videos but wasn't quite sure how everything worked. This PB101 lesson was tremendously helpful. "Elevate Your Game" doesn't even cover the value this lesson provided. Thank you for investing your time and effort into creating this series of videos.
@ShanaC-kg8oi
@ShanaC-kg8oi 3 ай бұрын
Thank you so much for the wonderful very well-explained lessons! :)
@John.Rearden
@John.Rearden 8 ай бұрын
Good lesson. You should consider including in this course giving a lay of the land about PHP, various javascript libraries various CSS frameworks, and the like. A birds eye view of the front end development landscape. Food for thought.
@ted-e-baer
@ted-e-baer 8 ай бұрын
Amazing lesson, Kevin. 50 minutes of net video time. I for one recognize the time needed to just setup the environment. So I am paying with a like, comment and share. This lesson was greatly enjoyed and I appreciate it very much. Cheers, Kevin!
@Gearyco
@Gearyco 8 ай бұрын
💪🏻
@isaurasotoca
@isaurasotoca 8 ай бұрын
Can’t believe we are almost at the end of this course 😢 With the last couple of lessons, things are getting more advanced and exciting!! Looking forward to next lesson! Thanks Kevin!
@AliciaTai
@AliciaTai 8 ай бұрын
Getting all this knowledge for free feels illegal! Thanks as always Kevin!
@S_Tito
@S_Tito 4 ай бұрын
Thanks, Kevin. Awesome content!
@twentyfoursixlife
@twentyfoursixlife 2 ай бұрын
This course has changed my life!
@kakenetit2
@kakenetit2 8 ай бұрын
Excellent lesson! I got the pop quiz right too!
@ManolisGerakakis
@ManolisGerakakis 3 ай бұрын
🤯Kevin. My man. I am sounding like a broken record but I have no words for your tremendous work, effort and knowledge you put out there for all of us, elevating and making us better one lesson at a time. A big big THANK YOU for everything.
@Gearyco
@Gearyco 3 ай бұрын
🙏
@ninjahaggblom
@ninjahaggblom 6 ай бұрын
I find a lot of value here!!! Thanks Kevin!
@Gearyco
@Gearyco 6 ай бұрын
🙌
@chamika1975
@chamika1975 7 ай бұрын
Wonderful course. Cannot find a valuable content like this YT. Thank you Kevin.
@evzone700
@evzone700 8 ай бұрын
As always, it is a masterclass. I need to practice it right away. Thx Kevin for the content and kudos for the innercircle, it is a gold mine!
@PswACC
@PswACC 8 ай бұрын
I have already been styling with Attributes and still picked up some new tricks with your video.
@dahunsi
@dahunsi 8 ай бұрын
The words fail me. So much effing value. Thanks a lot for these. Much love.
@re-member
@re-member Ай бұрын
Awesome lesson, Thank you
@shaikzubedi8007
@shaikzubedi8007 Ай бұрын
Great explanation 👍🏻
@danieleromano7442
@danieleromano7442 8 ай бұрын
Compliment, great tutorial!
@carmenyepiz3717
@carmenyepiz3717 6 ай бұрын
Thank you very much for this amazing course! I'm about to start my first Bricks website and for sure I will be rewatching your videos at the same time. Thank you again!
@eucalyptech
@eucalyptech 8 ай бұрын
Incredible value, thank you Kevin !
@TobiasGronbach
@TobiasGronbach 8 ай бұрын
That was gold! Thank you!
@stripedgoat8470
@stripedgoat8470 8 ай бұрын
This one, and L18 were extremely helpful, and I didn't know about many of this. Thank you Kevin!!!! 🙏🏼
@davidnickson5043
@davidnickson5043 8 ай бұрын
Sheeeeeeeeeeesh!!!! The people want more Kevin!! 🔥🔥🔥🔥
@ocbroadband
@ocbroadband 8 ай бұрын
This stuff is pure gold.
@Kirolmh
@Kirolmh 8 ай бұрын
Exactly what I was looking for. Thank you 10000 times! ❤
@LupusDesign
@LupusDesign 8 ай бұрын
Wonderful lesson, Kevin.
@JeffTincher610Digital
@JeffTincher610Digital 8 ай бұрын
this came in so handy today as I need to have ONE person always first and had to add a custom field for order/position. This is SOOO much easier and cleaner.
@billlewis22
@billlewis22 4 ай бұрын
I came to the end, and where is the rest of the series? Great job, Kevin , I appreciate your work and skills.
@mcostales84
@mcostales84 8 ай бұрын
This video is awesome! One of the best from the series so far! Thank you @Kevin Geary!!!
@krzysztofs31
@krzysztofs31 8 ай бұрын
Whole course is incredibly valuable and I’m really shocked that this is free! Thank you Kevin Geary very greatly, you’re the best!
@Gearyco
@Gearyco 8 ай бұрын
Glad you enjoy it!
@bluefuzecom
@bluefuzecom 8 ай бұрын
Amazing. This just solved something I needed, and that was the ability to have a bunch of news posts, but to allow a toggle to make it “featured” and when on, to show up first in the loop and look a bit different.
@Gearyco
@Gearyco 8 ай бұрын
💪🏻
@Louis-C-online
@Louis-C-online 8 ай бұрын
Such a dense and amazing episode thanks ! I always struggled and failed to find easy ways to order cards in certain ways, so the first example you gave in the video is very helpful. Now as you said, gotta open Bricks and start practising to make these new techniques stick to my brain !
@maymaster100
@maymaster100 8 ай бұрын
I didn't know how to thank you for so many teachings, that's why I just joined the inner circle :) It has been my best decision.
@Gearyco
@Gearyco 8 ай бұрын
🙌🙌🙌
@Zim_88
@Zim_88 6 ай бұрын
Men, this is the web developer's bible101. All these videos, I look and can't stop. What did you done? You changed me.
@Gearyco
@Gearyco 6 ай бұрын
💪🏻
@alexisrabbitt4430
@alexisrabbitt4430 8 ай бұрын
Great video, I'm watching it on break between projects and I'm about 3/4 through. All stuff I never knew. I wouldn't say the value of the data attribute is 'binary', either. 'Radio', maybe? :) Maybe the 'i' (for case insensitivity) is for 'insensitive'. Not sure if I'll ever use it but pretty sure that's how I'll remember it.
@johnnycakez2750
@johnnycakez2750 27 күн бұрын
Just a quick note- anyone who needs little prompts around selectors, pseudo classes, attributes, etc. WDS have a css selectors cheat sheet that I find very helpful.
@AmandaLucaseu
@AmandaLucaseu 8 ай бұрын
Awesome episode Kevin
@Edwin-Bautista
@Edwin-Bautista 8 ай бұрын
Great video like all the ones you make, the PB101 course video series are great, I am learning a lot and raising my level of knowledge to build websites. My knowledge of the English language is poor, but thanks to a Google Chrome plugin, it immediately translates the audio into another language, in my case Spanish, so I can better understand the lessons. Thank you very much Kevin.
@sophiemulders
@sophiemulders 8 ай бұрын
This is fantastic ❤ i knew they existed;’data attributes’ but did not know the how or what. Brilliant video!
@sophiemulders
@sophiemulders 8 ай бұрын
Would love a few lessons about javascript :)
@karlhungus5554
@karlhungus5554 5 ай бұрын
KMG: Hey, man. How did you end up here?! This is a long way from Rebooted Body. You're still looking good. 🙂
@lmsbolt
@lmsbolt 4 ай бұрын
All Im going to say is these later lessons, especially, make me feel like I've joined the Navy Seals or Delta Force for bricks builder...🤯
@Gearyco
@Gearyco 4 ай бұрын
🫡
@emadhosen
@emadhosen 8 ай бұрын
Thanks Kevin
@a.varezhnikova
@a.varezhnikova 8 ай бұрын
thank you
@jzea5605
@jzea5605 5 ай бұрын
Aching for that next course KG
@Gearyco
@Gearyco 5 ай бұрын
Inner circle 💪🏻
@joziahreynolds
@joziahreynolds Ай бұрын
Beginner... time to rewatch the series and go check out ACSS and the inner circle... My first web project is gonna be on the same level as 'Reasonable Doubt' lol
@Gearyco
@Gearyco Ай бұрын
💪🏻💪🏻💪🏻
@rubengarciajr
@rubengarciajr 8 ай бұрын
So much goodness on this video
@okanime1
@okanime1 7 ай бұрын
I took that firehose to the face! Died several times but I made it! Thank you for sharing your knowledge with the world.
@Gearyco
@Gearyco 7 ай бұрын
💪🏻
@hourglass716
@hourglass716 8 ай бұрын
Absolutely amazing episode. This stuff is actually possible??
@issakhlief
@issakhlief 8 ай бұрын
Kevin hits again 🎉🎉
@Gearyco
@Gearyco 8 ай бұрын
Doesn't miss.
@vaughanprint
@vaughanprint 7 ай бұрын
This is really valuable stuff to know. One quick question, and apologies if I missed it from an earllier lesson. In the profile cards you used the class naming convention of two underlines for __title and __name. I've notted all the other BEM naming conventions but this one is neww to me? And, one more, there was bin-- with the two trailing hyphens. Lastly. It's been a real pleasure getting to know all the information you have imparted over the 19 videos. I already knew or was awre of some this but now am empowreed with all of it coming together, in a way that will be beneficial to my work in the future. I am just starting to use Bricks and I first encountered you on Jamie Marsland's interview where you were questioning the direction of WordPress and the Gutenberg project. I was hovering on Divi and waiting to see where the block editor was going to go as an alternative but am now more convinced that builders like Bricks are what we need if we are serious about building sites properly.
@Gearyco
@Gearyco 6 ай бұрын
The __ is the core of the BEM naming convention. "--" denotes a modifier class on a block. So for btn--action it basically means, "this is a button styled with the action styles" vs "btn--black" would denote a black button.
@MB-sl8pw
@MB-sl8pw 8 ай бұрын
Think this is why you have to learn web design the right way, this is a Facebook post from the divi group Client initially approved the design now 3 months and 50+ pages later, he wants to change the title text. I had initially set this in each module and cloned the page. I do not want to change 20 titles per page times 50 pages, going 1 at a time. None of the css I'm writing is working though. I'm trying to make all h1-h6 alata font (from aldrich).
@Gearyco
@Gearyco 8 ай бұрын
YEP!
@vishystiffler7625
@vishystiffler7625 8 ай бұрын
Thanks for all the helpful content Kev! Can I ask what font name is used for the body text and on the black buttons? Thank you 🙏
@Gearyco
@Gearyco 8 ай бұрын
Outfit
@jacobwwarner
@jacobwwarner 5 ай бұрын
I've made it all the way to the end, I've found valuable insights from each and every video, commented and liked every video and kept this playlist saved for future reference. I love it, especially how to work with CSS within the context of a page-builder like Bricks. I'm more used to writing out the code directly, but I haven't worked much with dynamic, or programmatic CSS, like this. Is there a way to work with JavaScript and REST APIs directly within a WordPress page builder like Bricks? For example, creating a component that can be populated with data from an external source rather than the connected WordPress database. Also, are there instances where you would need to be working directly with PHP on the Bricks theme or child theme files? Or is this another area of the WordPress site's code that you work on the PHP? I haven't found a course thoroughly covering this yet.
@Gearyco
@Gearyco 5 ай бұрын
Anything is possible
@fabiamc
@fabiamc 8 ай бұрын
Are dynamic attribute workign with ACF repeater in Bricks currently?
@Gearyco
@Gearyco 8 ай бұрын
As far as I know.
@mr.matt.eastwood
@mr.matt.eastwood 8 ай бұрын
Hey Kevin, at 24:21, you show the status badge doesn't have any CSS on it. Yet, on the front end, it says "Status". How can it do that without any CSS? Shouldn't there be an attr function somewhere to make this work? Is it on :before here too? Watching on my tablet in low res so I might be missing something.
@Gearyco
@Gearyco 8 ай бұрын
Yes, there was an attr() on it already, but that was it. I think I meant no styling CSS.
@mr.matt.eastwood
@mr.matt.eastwood 8 ай бұрын
@@Gearyco Thanks!
@shibupandit24
@shibupandit24 8 ай бұрын
Can we create a thankyou page and able to show the thank you - name. The name will b take from the form first name.. ?
@Gearyco
@Gearyco 8 ай бұрын
Yes but not with the techniques in this video. It’s a different method.
@filmgenius2
@filmgenius2 8 ай бұрын
Can data attributes be utilized in conjunction with membership plugins? For instance, if I create a query loop to show the first 3 cards and blur the remainder for non-members, could this be achieved if the membership plugin supports it?
@Gearyco
@Gearyco 8 ай бұрын
I suppose it depends on the membership plugin. I'm not sure it would be foolproof, though. People could manipulate the DOM in the inspector and undo any CSS you're using to blur things.
@filmgenius2
@filmgenius2 8 ай бұрын
@@Gearyco I use Sure members for a directory website and okay that makes sense. Thank You
@iainjhamilton
@iainjhamilton 8 ай бұрын
So much content here! I was hoping for a way to link a CPT card to an internal URL. As there is only one "real" card in the DOM, how would I link each card to a different URL?
@Gearyco
@Gearyco 8 ай бұрын
I’d need more context as to what you’re wanting to accomplish. What are the cards for and where do they take people?
@iainjhamilton
@iainjhamilton 8 ай бұрын
I'm using Frames Feature Card Hotel, and have set up dynamic content for the image, heading, and accent text. I'd like each card when clicked to take visitors to a separate dedicated page featuring more information on the topic. I just can't see where I can add the relevant URL. @@Gearyco
@Gearyco
@Gearyco 8 ай бұрын
@@iainjhamilton sounds like you need a CPT…
@iainjhamilton
@iainjhamilton 8 ай бұрын
I created a CPT in ACF, that's where the frame is drawing content from. But each card needs to link to a separate page and I can't see where I can do that. @@Gearyco
@Gearyco
@Gearyco 8 ай бұрын
Just create a link and in the url path use dynamic data to link to the post url.@@iainjhamilton
@satolbo
@satolbo 8 ай бұрын
Oh no, you said Gif wrong. :P
@Gearyco
@Gearyco 8 ай бұрын
It’s a hill I’m willing to die on 😂
@simonkerridge
@simonkerridge 8 ай бұрын
Wow! So much info and power. The beauty of KZfaq is this goldmine of info can be watched again and again. 👍🫡
PB101: L18 - Programmatic Styling With Pseudo Classes (Critical)
1:02:37
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,5 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 18 МЛН
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 12 МЛН
BEM 101: How to Make Web Design Organized & Scalable
1:01:37
Kevin Geary
Рет қаралды 20 М.
How to use the DATA attribute with JavaScript, HTML and CSS.
10:10
iEatWebsites
Рет қаралды 14 М.
How to create a CSS navigation bar in 6 minutes! 🧭
6:28
Bro Code
Рет қаралды 237 М.
PB101: L09 - Creating Common Page Layouts With CSS Grid
1:10:37
Kevin Geary
Рет қаралды 16 М.
МАМА И STANDOFF 2 😳 !FAKE GUN! #shorts
00:34
INNA SERG
Рет қаралды 4,5 МЛН