Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
by Jeremy Fairbank When we want to offer customizability to the users of our applications, things can get tricky. How do we allow users to customize the look of the user interface while reusing the static CSS we’ve already designed? There is a way, but it is fraught with many dangers. Learn about the power of dynamically generating CSS from Sass files. Tackle the foes of dynamic content injection, rendering, caching, and background processing. In the end, we will look triumphantly at our ability to reuse our application styles to create customizable interfaces for our end users. Help us caption & translate this video! http://amara.org/v/G8uZ/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In this video titled "Dynamically Sassy" by Jeremy Fairbank, the focus is on leveraging the Sass CSS preprocessor to create dynamic stylesheets based on user input. Fairbank addresses the challenge of allowing users to customize user interfaces while reusing existing static CSS. Key points discussed include: - **Introduction to Sass**: Fairbank introduces Sass as a CSS preprocessor that enhances the maintainability of stylesheets through features such as variables, nested rules, and mixins. - **Dynamic CSS Generation**: The core goal is to generate dynamic CSS by accepting user input while retaining the ability to reuse static stylesheets. Fairbank emphasizes not duplicating code across static and dynamic contexts. - **User Experience Design**: He discusses how Simply Built, the website builder he works on, originally limited users with predefined color palettes. The new dynamic customization allows users to select a seed color from which various pleasing palettes can be generated. - **Technical Implementation**: The talk details the implementation process, including writing Sass functions in Ruby, managing dynamic content injection, and the limitations of Rails’ asset pipeline for supporting dynamic rendering. - **Performance Concerns**: Fairbank identifies potential performance bottlenecks such as slow rendering times when dealing with complex stylesheets. Solutions explored include caching generated CSS and using background processing to improve efficiency. - **Caching Strategies**: Integrating caching with tools like memcached is suggested to reduce render times considerably from two seconds to less than 500 milliseconds for repeated requests. - **Background Processing**: Fairbank also suggests using Sidekiq for offloading rendering processes, which can manage requests more efficiently without clogging the main server thread. Fairbank concludes with the importance of balancing simplicity in solutions with the need to consider performance implications, reflecting on how well-structured code practices can significantly enhance overall performance. The session provides valuable insights into optimizing Sass for dynamically generated styles, offering practical solutions to common challenges in web development.
Suggest modifications
Cancel