Esteban Lorenzano

I worked mostly on implement a better version of Styles for Spec 2.

We do not have a good way to apply styles to our applications and this is the main reason why so much hardcode can be found when developing a morphic component.

Problem with this is that later this does not scales... you cannot change sizes and properties in a reliable way.

So, we decided to copy the "style" approach of html: our components can be styled and themed (up to a point) using a description you can add in your application component.

This is still WIP, but style will look more or less like this:

.application [
	Font { #name : "Source Sans Pro", #size : 10 },
	Geometry { #height: 25 },
	.label [
		Geometry { #hResizing: true }		

Yes, this is STON and not CSS.

No, we will not use CSS.

Why? Because CSS is much more than what we need, and we do not want to add yet-another-parser just to use a small part of something when we already have a good parser (STON) which can give us direct object we can interact with.

6 August 2019 8:30 pm 0 Comments - Link