Skip to main
Article
Miriam Suzanne and former OddBird Una Kravets

VueFinder at VueConf, 2019

Dynamic CSS with Vue

Inspired by VueConf 2018 I spent some time learning JS and Vue in more depth, and built myself a more flexible VueFinder presentation tool to fit my needs. This year, I returned to VueConf and gave the closing talk on passing data between CSS and Vue.

After learning about Vue from Sarah Drasner’s stream of articles on CSS-Tricks, I had the pleasure of speaking at VueConf 2018. I really enjoyed that conference, and left feeling inspired by the community and the framework behind it. I loved that I could build complete and valid Vue components in plain HTML/CSS – and slowly integrate JS logic as necessary. I started digging, and quickly learned to bind JS data to HTML attributes:

<table :style="{'--scale': graph.scale}">
  <!-- ... -->
  <td :style="{'--value': item.value}">{ item.value }%</td>

CSS variables provide a safe approach for passing JS settings to CSS via inline HTML. While most inline styles are difficult to override, CSS variables can instead be ignored – making their inline specificity harmless.

I wrote a quick demo for CSS-Tricks – More CSS Charts, with Grid & Custom Properties – and continued to develop the idea into my latest talk: Dynamic CSS. This talk explores how data can be used to manipulate presentation directly in CSS – a combination of variables, calc(), grids, hsl() and more.

The slides are online, and you can sign up for a notification when the videos are posted.

While learning JS and Vue in more detail, I decided to re-build my presentation software to better meet my needs as a speaker.

The result, which I call VueFinder, allows me to write slides using a slightly-extended markdown syntax – with yaml metadata for each slide. That metadata controls slide layout, allows me to embed Vue components directly for live demos, and pass in CSS variables for custom styling.

VueFinder is public and open-source, though it isn’t currently as reusable as I would like. The content and logic are tightly coupled in ways I haven’t yet resolved. If you’re interested in helping make this a more viable open source tool, or using it yourself, I’m open to new features and PRs.

After VueConf, Rahul Kadyan released an extension for Visual Studio Code that provides syntax-highlighting and code-folding for my .slides files, as well as the .vue-slides format he uses. Thanks, Rahul!

This year I connected with the Vue Vixens, and enjoyed getting to know more of the Vue community. Chris Fritz and Rahul helped me add some last-minute features to my slide deck, while Maria Lamardo and Krystal Campioni both inspired new demos in my talk.

Animated sprites from Monster Slayer by Krystal Campioni [permalink / source] – hover to see them move

You can find all the available speaker slides linked from gist.

Upcoming Workshop

Mia from behind,
standing at a laptop -
speaking to a conference audience
and gesturing to one side

Cascading Style Systems

A workshop on resilient & maintainable CSS

New CSS features are shipping at an unprecedented rate – cascade layers, container queries, the :has() selector, subgrid, nesting, and so much more. It’s a good time to step back and understand how these tools fit together in a declarative system – a resilient cascade of styles.

Register for the October workshop »

Recent Articles

  1. A dog zooming by the camera, up-close, body twisted and eyes wide as it circles a grass yard
    Article post type

    Zoom, zoom, and zoom

    The three types of browser (and CSS!) magnification

    I’m working on an article about fluid typography, and relative units. But instead, I fell down this rabbit hole – or a cleverly-disguised trap? – trying to understand ‘zoom’ in the browser (not Zoom™️ the software). Since I couldn’t find any up-to-date articles on the subject, I thought I shoul…

    see all Article posts
  2. A rusty anchor hanging with the sea in the background.
    Article post type

    Updates to the Anchor Position Polyfill

    Catching up to the spec

    Our sponsors are supporting the continued development of the CSS Anchor Positioning Polyfill. Here’s a summary of the latest updates.

    see all Article posts
  3. A back hoe on the bank of the Suez, trying to free the Ever Given cargo ship
    Article post type

    Learn Grid Now, Container Queries Can Wait

    Take your time with new CSS, but don’t sleep on the essentials

    Several people have asked recently why container queries aren’t being used more broadly in production. But I think we underestimate the level of legacy browser support that most companies require to re-write a code-base.

    see all Article posts