Monthly Archives: May 2017

CSS Custom Properties and Theming

Update css variable values using JavaScript and update all stylesheet rules that reference that variable

 

Chris Coyier writes:

We posted not long ago about the difference between native CSS variables (custom properties) and preprocessor variables. There are a few esoteric things preprocessor variables can do that native variables cannot, but for the most part, native variables can do the same things. But, they are more powerful because of how they are live-interpolated. Should their values ever change (e.g. JavaScript, media query hits, etc) the change triggers immediate change on the site.

Cool, right? But still, how actually useful is that? What are the major use cases? I think we’re still seeing those shake out.

Read more from the source: CSS-Tricks

What Programming Languages Are Used Most on Weekends? – Stack Overflow Blog

Amazing analysis of what developers REALLY want to work on

 

For me, the weekends are mostly about spending time with my family, reading for leisure, and working on the open-source projects I am involved in. These weekend projects overlap with the work that I do in my day job here at Stack Overflow, but are not exactly the same. Many developers tinker with side projects for learning or career development (or just for fun!) and at Stack Overflow, we support all types of technologies, from professional to hobbyist. Whenever people are working, we’re available to answer their questions. But what languages tend to be asked about on weekends, as opposed to weekdays?

Read more from the source: Stack Overflow Blog

TypeScript at Slack: how we converted and what we learned

Case study of converting a large codebase from JavaScript to TypeScript: it is not as painful as you might think.

 

On the Slack Engineering Blog, Felix Rieseberg writes:

We decided to use Microsoft’s TypeScript, which combines static type analysis with a compiler. Modern JavaScript is valid TypeScript, meaning that one can use TypeScript without changing a single line of code. This allowed us to use “gradual typing” by enabling the compiler and the static analysis early, without suspending work on critical bug fixes or new features.

In practice, switching the analysis and the compiler on without changing code means that TypeScript will immediately attempt to understand your code. It uses built-in types and type definitions available for third party dependencies to analyze the code’s flow, pointing out subtle errors that went previously unnoticed. Wherever TypeScript cannot understand your code, it will assume a special type called “any” and simply move on.

Read more from the source: Several People Are Coding

CSS Animations vs the Web Animations API: A Case Study

Controlling CSS keyframes, transitions and animations from JavaScript: pretty intuitive

 

Last week, I wrote about how I created the bitsofcode logo animation with CSS. After that, it was suggested that I attempt a comparison between a CSS animation and the Web Animations API, so here it is! Introduction to the Web Animations API As with last week, I’ll start this

Read more from the source: bitsofcode