Our new Edgar Allan website, which we're launching next week 🤫, uses over 3,000 lines of code. It’s a bit unwieldy! To better support the new EA website and similar JavaScript-heavy projects, we’ve added Not ready to watch the video? No problem. To import a file, simply start typing the name of the file you want to import and click on the code completion dropdown. Once Give it a try and let us know what you think! Community library scripts💸 Number to Currency 📝 Currency to Number 🔘 Select Radio on Load -- Javascript 101: Modular CodeWith the addition of The key benefits of writing modular code include improved organization, enhanced maintainability, greater code reusability, easier debugging, and better collaboration in team settings. Here are a few best practices to help you think more modularly:
Here’s how you can start writing more modular code in Slater:
That’s it! Are you already using modular code in your projects? -- Your projects, supported by SlaterHow Money Works is one face of a much larger Webflow-enabled application: howmoneyworks.com. 🤙 the Slater Team If Slater helps you create better websites, please support the team behind it.
|
Slater resources, updates and community activity
Do you get confused when undoing (cmd + z) in Slater? We auto-format your code on save. The auto-formatting updates your code, and those updates get pushed into the undo stack. You can now improve your workflow by formatting the code when you choose—not just on save. To gain more control over when your code formats: Turn off auto-format code in the Code Editor Settings Use cmd + shift + f to format your code We added a handful of other improvements: Console logs and debuggers are now...
Last week, we announced that CSS updates were on the way—and now they're here! You can now generate CSS files just as quickly and easily as JS files. In the video below, we give a quick demo of the new functionality. If you have a Smart Script loaded in your project, you can instantly add CSS. In the demo, we also show how to add CSS in the Webflow designer. Give it a try and let us know what you're building! Community Library 🖍️ Text Highlight ColorCSS code for custom text selection. 🅰...
Do you use Slater for CSS? CSS support in Slater has always been somewhat of an afterthought—JavaScript is our love language! But sometimes, you need a simple way to add CSS to your project. Maybe you want to write a complex grid or use a CSS property that Webflow doesn't support. That's why we've decided to make CSS a first-class citizen. We considered launching the new CSS functionality today, but we want to test it a bit more. Expect it early next week. To prepare for the launch, let's...