Skip to content
206 – Miriam Suzanne ⚡️ VueConf US 2019 episode artwork

Apr 5, 2019 18 min

206 – Miriam Suzanne ⚡️ VueConf US 2019

from Thunder Nerds Hosted by Frederick Philip Von Weiss, and Brian Hinton

https://twitter.com/mirisuzannehttps://us.vuejs.org Dynamic CSS with Vue CSS has come a long way since the browser wars of the late 90s. What...

Episode details come from the podcast's RSS feed.

Embed this episode

https://twitter.com/mirisuzannehttps://us.vuejs.org Dynamic CSS with Vue CSS has come a long way since the browser wars of the late 90s. What used to be a struggle, is now often a breeze (see box-shadow or border-radius). But the last 2 years have pushed CSS into entirely new territory: with DOM-aware variables and calculations that can drive your design. We can inject data directly into our themes and layouts, but where does that data come from, and how do we safely wire it up? Vue provides all the tools we need, but first we have to understand the possibilities and constraints. We’ll cover… The basics for understanding CSS custom properties, grid, and calc(). Practical examples and use-cases for data-infused design. How dynamic CSS & JS work together in this new paradigm. Robust patterns for managing themes, layouts, and more from Vue.

Ready to play

206 – Miriam Suzanne ⚡️ VueConf US 2019

0:00 18:48
of matches

Transcript Auto-generated, may contain errors

Thunder Nerds. I'm Brian Hintzel. I'm Jeff Zara. And I'm Project Philip Von Bison. Thank you for consuming the Thunder Nerds. Conversation with the people behind the technology. That love what they do. And do tech good. We're doing tech here at ViewConf US 2019.

Yeah, where are we at? We're in Tampa, Florida at the Strasburg Arts Center. Yeah, and we are here with a very special guest. We're here with Miriam, Suzanne. Welcome to the show. Thanks. Thanks for joining us. Absolutely. Thanks for having me. Yeah, so when is your talk? So now I'm tomorrow afternoon. I think I'm the last one at the conference. Oh, really? You're at a closer? Wow. It was supposed to be like right now or soon. Are you sure they changed it? They changed it back. They changed it? So what are you speaking about today?

I'm talking about CSS. Stop. We love CSS. Awesome. I love CSS too. We're down for it. What about CSS with Vue? I'm talking about dynamic CSS. A lot of the new things that CSS can do, especially if you pass in raw data with CSS variables, and then manipulating that data directly in CSS to generate dynamic layouts. What do I do? How do I use these variables? Yeah, dash, dash, give it a name, and then give it a value. Watch her talk. How do I actually use it with Vue? With Vue, the great thing is instead of

Instead of doing a lot of inline styles that are generated from the JavaScript and that are hard to override, you can do inline variables very simply and completely safely because all the CSS has to do to override them is ignore them. That's it. So if you pass in variables and then let the CSS decide what to do with them, it's a totally safe way of passing in data from JavaScript and doing anything you want with it. Nice. I love that. So why is this subject? Well, I spend most of my time doing CSS.

It was a thing that I started doing. It was actually we were doing a scheduling app for a client. And I was like, I bet if we just pass in a start time and duration, the CSS could do the entire layout for us, and we wouldn't have to do any of the positioning values on a schedule. Yeah, I built it in like 15 minutes and showed it to the other developers, and they were like, yeah, OK, that'll work. 15 minutes. And we had a, I mean, it's just, if you know CSS Grid, it only takes those couple values, and you've got a whole layout. Oh, see, that's beautiful. So I mean, we didn't have the tool done in 15 minutes, but we got that.

I hope you carry a light around and just drop it. It worked. I mean, it's lucky that the client doesn't need support for Internet Explorer or something. It's not everywhere. But there's a lot of fun toys in CSS now, and using them to do things that used to be quite a bit harder, it's pretty exciting. Yeah, it's nice to see it finally. I feel like it's almost rapid. I mean, it seems like for a while, it kind of sat there and then, oh, flex, boom, grid, variables.

Grid landed in a simple weekend in three browsers. That was intense. It's amazing now that we have these evergreen browsers. We don't have these concerns anymore with browsers not being able to support things. And then they'll just catch up. And then there's Houdini that's going to allow you to build anything you want, which I'm not quite sure how I feel about that. It should be interesting. I think they're hoping to get good ideas from it and then basically pave the cow paths. If people build cool things in Houdini...

Then the browser developers will just say, oh, well, that's a good syntax. Let's just use it. That's true. Kind of like how nesting is starting to be in CSS now. Their specs are out. They're like, we're doing it. Everybody. Variables came from SAS, although they adjusted some for the DOM.

Yeah, I mean, SAS brought so many good ideas out there. They were like, yeah, that makes sense. Let's just do that. Yeah, exactly. So you tell us kind of how the origin of your talk. Can you tell us a little bit about the time it took you to make the talk? And did you present your family and friends? Tell us about that. Well, I give quite a few talks every year. So I've done this one a few times. It sort of changes every time because I build new demos for it. And I think, oh, what if I did this? And I often, I'll see somebody else give a talk, and they'll show something. And I'll be like, I bet I could build that with.

CSS variables. And then I would go back and code it that night and be like, remember what this person talked about yesterday? Let's try it with CSS variables. I love that. So I enjoy doing that. Yeah. You know, we didn't really actually even ask you about, like, what do you do and where do you go? Yeah. Yeah. Yeah. I run a small remote agency. There's six of us. I'm in Denver. There's two of us in Denver and then people across the country. So Chicago area, North Carolina now. What's it called? Oddbird. Oh. And then how can people find it? We'll put a link to the show. Yeah. Check out oddbird.net.

And we do client work for clients of all sizes, all sorts of projects. So sometimes we're doing greenfield start to finish of the new application, and sometimes we're coming in and we're the team that takes over a project that was done quick and dirty. And we come in and fix it. Yeah, we do a lot of refactors. Why do they use five different jQuery versions? Yes, you don't need jQuery and these five other... Why did you pick a CSS versus using Sass or a Western? I do use Sass quite a bit, and that's actually...

I mean, I sort of started speaking at conferences because I released a tool in SAS. It's called SUSE. Oh, yeah, that's right. Yeah. So I built that back in 2009. And that got big. And then it started to, you know, Grid came out. And I was like, oh, my career is over. So I was like, I better learn Grid. And I started giving a talk called Don't Use My Grid System. And that went over well. That's awesome. So how did you start to get interested in Vue?

I am friends with Sarah Drasner, and she wouldn't shut up about it. So I started looking at it, and I liked that it respects CSS and SAS as their own piece, and HTML as its own piece. And I was like, I can immediately look at this, and I already know how to write two-thirds of a single file component. All I need to do is learn that other third, and I can start building things on my own. Yeah, which is awesome. And it was so quick. I picked up Vue. I did my first demo in it for a talk. And then over the summer, I built my slide deck. I rebuilt all my slide decks in Vue.

It's the first app that I built start to finish with JavaScript on my own. Anything cool that you did in it? I think it's pretty cool, but it's probably shitty. Did you add anything that was uniquely you? It uses some of these ideas. It uses CSS Grid to do some of the layout. I did a thing that basically lets me write slides in a markdown file, and it just has a slide delimiter. It also allows front matter for each slide. It basically parses it as multiple markdown files with front matter.

but all from a single file. Then I can reference components from there and pass in variables so I can do exactly what I'm talking about. I can pass in those CSS variables per slide and then have it alter the design on the slide. That's really cool. How did you get started learning? Because you said that you still had that one-third left to go. Was it just building those slides? I think it was Sarah's CSS tricks articles. I was building my one demo and I needed to do certain things and I started reading her articles and checking the docs and I can pull this in, I can pull this in. Then finally I was like,

All right, I got to go learn some more JavaScript. So then I took one of the online courses. I got better at JavaScript generally, and that's helped. Which one? Yeah, which one was it?

Was it a West Boss? It wasn't a West Boss. I think it might have been Front End Masters. Oh, yeah. But I don't remember. But it was funny. They have a list of courses, and it's like, learn Ruby, learn CSS, and then introduction to JavaScript. You can't learn JavaScript. JavaScript cannot be learned. It will never be learned. Well, what was that aha moment for you? When did it click, and you're like, I get this, and it's awesome? Yeah. Yeah, I don't know. I mean, it was sort of right away. The fact that I was able to build something quickly without much JavaScript experience.

I was just like, oh, this is a thing I can use without really understanding a lot of the underlying technology. I mean, I come from SAS, so I understood functions and arguments and basic programming and was like, a lot of this translates. And the code is just very clean in Vue, very organized. It was easy to look at other people's stuff and copy and paste and find my way. I love how the Vue files, like you were saying, the separation of presentation and styling. It's just really nice. I love how the code is. And the fact that you can just

Like we were talking earlier, how you could just include the Vue.js file and suddenly you're in. They're like, oh, I need to install these 50 other modules and packages that have 1,000 other packages that are dependent on those. Yeah, and of course you can get as complicated as you want. But that point of entry of just that one line of that included. I think I started with just a CodePen demo for the initial. So then I was using the new view and linking to an existing HTML template. And then to actually build something, I switched over to Nuxt.

and got all that opinionated, helpful, built-in stuff. Have you played with Vpress yet? I played with it briefly. I decided it didn't do all the things I wanted for my website, so I didn't use it much. What did you do? I ended up using Eleventy. Oh, really? Does it do Vue.js? It ships without any browser-side JS. I'm trying to figure out now if I can slowly integrate Vue into it. I'm happy with StaticSite for most things, but I'd like to be able to build little demos in and special features. I'm going to be looking into that. I'm going to need to read some more talks.

Well, we hear the docs are pretty good. Everybody is like the standard. It's true. Why do you like Vue? The docs. The docs are amazing. They're beautiful. Yeah. They are. It's also like, so this is a real fun fact for me. But I really enjoy the comparison that's in the, you know, Vue docs where it's like, why would you choose Vue over React or Ember or, you know, jQuery or, you know, Bob's your uncle, right? Like anything. And it's like, well, this is why you choose this and this is why it's better and this is why it's worse and this is how it's like the same. For me, there was kind of no question between them because when I look at the others, I see.

systems that were designed for JavaScript developers that allow you to then do HTML and CSS in a JavaScript way, and I want the opposite of that. Yeah, I love that. It empowers, especially people who are HTML and CSS, like, engineers, right? Like, those are also engineers, right? Like, it's not just a JavaScript engineer. It's not just, like, a view engineer or an engineer. It's like, HTML and CSS are...

hard and it's difficult and people are very passionate about it. It's amazing that you're able to use Vue in that way and be like, you know what, I just need this bit of JavaScript so I got this. Immediately it gave me, just creating a couple form fields with vModel, I could suddenly manipulate all my data and then pass it into styles. That was all that I needed to build a lot more CSS demos while barely touching any JavaScript. It gave me that right away and that was a great way in. You're like, cool. Then you're like, let's go out to dinner and celebrate. This is so awesome.

Except it was more like, let's stay in code all night. It was so awesome. Pizza Wine Code. That would be a good hackathon. Pizza Wine Code from 9 to noon. Yeah, with brunch in the morning.

Yeah, you have mimosas in the morning. Can we have a bed? I can't drink in color at the same time. Oh, it looks good. Can we have maybe waffles and chicken? Yeah, we can have chicken and waffles. Chicken and waffles. Sorry, we're hungry. Don't judge us. Well, I know we're running just about out of time. How can people learn more about you? What's your website? What's your Twitter handle? We'll put it in the show notes for our audio listeners. Yeah, Twitter handle is at MiriSuzanne, M-I-R-I-S-U-Z-A-N-M-E. You can find me either at oddbird.net or MiriamSuzanne.com or Miriam.Codes.

Even shorter. And if you don't mind, do you have any kind of words of wisdom or any kind of final thing to tell our audience about your talk or about anything within the community with you? No, I don't know. Words of wisdom. I don't know. Play around. There's a lot of fun toys. Build little things. It's fun to build little things on CodePen or wherever. That's how you learn, right? That's how I learned. That's how I learned Grid. That's how I learned all these.

It's just like, what would happen if I tried to build this thing? I don't know. Or Code Sandbox. I learned today in a tweet about how they can actually deploy directly to Netlify now. Oh, really? That's pretty clever. That's super cool. Yeah, I saw some features there that I want to try using for a workshop I'm doing. It seemed like I could get everybody working from the same system to start with, which is pretty cool. Yeah. Instead of everybody having to set up their own machine. Yeah. That's always the one. That's pretty cool. Well, thank you so much for being on the show. Yeah, thanks for having me. Really appreciate it. Great to meet you all. Thanks, everybody, for watching. We got some work going on. Yeah, we can double it. You too. Bye.

Thanks for consuming the Thunder Nerds. We honestly and sincerely appreciate you watching and or listening to the show. Please subscribe on YouTube and iTunes. Write us a review, kick a few stars our way. And above all else, please remember to send your favorite book suggestions to Brian Hinton. I like romance novels. They have happy endings. I should have known the Territore didn't mean us any harm when the Sword of Omens didn't obey me. And anyway, it was just plain stupid to assume it might be bad. Just what the fuck am I talking about?

Frequently asked questions

How long is this episode of Thunder Nerds?

This episode is 18 minutes long.

When was this Thunder Nerds episode published?

This episode was published on April 5, 2019.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this Thunder Nerds episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.