I am Mark Dalgleish. Ask me anything.

Mark is the co-creator of CSS Modules and writer of many articles on CSS and related topics. He runs the MelbJS meetup, which brings elite speakers and the interested front end community together once a month in Melbourne, Australia. He's currently DesignOps Lead at SEEK.

Ask Mark Dalgleish about:

  • CSS Modules
  • MelbJS
  • JavaScript
  • ECMAScript
  • General Programming advice
  • Contributing to OSS
  • Working from Melbourne

That about wraps it up for me. Thanks everyone, I had a great time answering all of your questions. If you have any more, feel free to contact me on Twitter (@markdalgleish) 👋😄

Ask a Question

52 discussions

What are your thoughts on Facebook’s BSD+Patents License? Are you for or against this move?

To be honest, I'm really not qualified to comment on this topic, and my opinion may change over time as I spend more time thinking about this, but I'll at least share my gut reaction to it.

To me it seems like a defensive play by Facebook and it doesn't worry me, personally. If I could choose, I'd probably prefer they use a more traditional open source license, but they're of course free to license their software however they like. I still happily use React and don't plan to change any time soon.

Not sure where that puts me in terms of "for or against" 😄

Reply to this…

Hashnode is a friendly and inclusive dev community.
Come jump on the bandwagon!

  • 💬 Ask programming questions without being judged

  • 🧠 Stay in the loop and grow your knowledge

  • 🍕 More than 500K developers share programming wisdom here

  • ❤️ Support the growing dev community!

Create my profile

Hey Mark, How did you become the lead organizer of MelbJS?

I just kinda stumbled into it, actually!

I went along to my first MelbJS way back in 2011, I think it was. At that time it was being run by Anette Bergo from Thoughtworks, but she moved to Europe not long after that and needed to hand over the reigns. A few of us stepped up, including myself, but I ended up taking on most of the responsibilities. I created a new website, set us up on Lanyrd, started organising speakers. It really just snowballed from there, and I'm still going today.

I really love organising these events, helping to build a great little community, and JavaScript is such a rapidly evolving space that there's never a shortage of things to talk about.

You can see every one of our events on Lanyrd now, which goes all the way back to July 2012! http://lanyrd.com/series/melbjs

Reply to this…

Hello Mark, What type of projects you recommend using CSS Modules and with which technology?

CSS Modules are really most at home when using a module bundler like Webpack, and using JavaScript to generate your markup (whether that's in Node or the browser). You can get it to work in other environments, but it might take a bit more work.

In terms of architecture, while you can technically organise your styles however you like, CSS Modules is definitely designed for use within a component system, so a component-focused library like React is a perfect fit.

The other aspect to consider is team size and experience. Even as someone who's been working with CSS professionally, I really enjoy the constraints that CSS Modules forces on me. My appreciation for this reaches a whole new level when I'm working on a team of mixed front-end experience, where team members come and go, and we can't expect that everyone is a CSS architecture expert. CSS Modules has a really great effect of lifting the baseline level of quality within your project, ensuring that your styles can actually be refactored by severely limiting the amount of coupling between components.

Reply to this…

How would the JavaScript eco-system look like after 10 years?

10 years is a really long time in this space. To be honest, I wouldn't be at all surprised if we're basically not writing JavaScript in 10 years, particularly with things like WebAssembly coming along—but who knows.

I'm hoping we see augmented reality take off within that timeframe, with AR glasses (or something similar) going mainstream. The tech isn't there yet, but it's getting closer every day. Freeing ourselves from the confines of flat, relatively small rectangular screens sounds like a really exciting future for UI, and it would have a huge effect on how we think about the web and on-demand interfaces.

Reply to this…

Does CSS Module affect performance or does it make it better on a javascript based scale project?

In terms of performance, CSS Modules is a really great balancing of concerns. Of course you get all the benefits of locally-scoped CSS, but when compiled for the browser, CSS Modules performs exactly the same as regular CSS since there's literally no runtime. It just generates a static CSS file, and your markup then references it like you normally would.

For my needs, I find this particularly useful in a large organisation where we need to settle on a common way of building UI components that can be shared between teams. Being able to generate components with co-located styles without incurring a performance or bundle size cost makes it a much safer bet across an entire company.

Reply to this…

Load more responses