In Sciter <frame> element may have content-style attribute defined. That content-style attribute takes URL of style sheet that gets applied on top of existing styles of the document: <frame src="some-child.htm" content-style="content.css" /> That content.css gets appended to the list of other styles of the some-child.htm as if that document has <link rel="stylesheet" type="text/css" href="content.css"> at…
Category: HTML and CSS
display:none is considered harmful
Quite often in HTML/CSS based UIs we need to hide/show some elements in runtime. Probably the most widespread (and the worst) solution is to set display:none CSS property programmatically. That sounds quite easy at the first glance but solves only half of the problem – it hides – removes the element from rendering tree. But…
Context menus in Sciter
Context menu is a standard UI feature and in order to support them Sciter has following mechanisms on board: custom CSS property named context-menu. It defines location of DOM element ( usually it is one of <menu class=context> ) that will appear on context menu activation. Menu behaviors and their DOM events associated with menus….
Sciter. Declarative behavior assignment by CSS: ‘prototype’ and ‘aspect’ properties
From the very beginning Sciter supported declarative scripting class assignment to DOM elements. If you want all div.some-widget elements in your document to behave in some special way (be subclassed) then you will need: 1. in script to declare class SomeWidget : Behavior { function attached() { … } // called with ‘this’ set to…
“Theory” of URLs for developers
We are using URLs these days quite a lot, but not all of us understand what they actually are. By this post I will try to explain their structure and how Sciter/HTMLayout deals with them. Please note that this is sort of informal explanation and I am using term “URL” here while “URI” is more…
Sciter,
Adding basic <video> support to Sciter. The <video> element (behavior:video in fact) is rendered windowlessly as normal DOM element so can participate in animations, transforms and to have other DOM element rendered on it. Here is a screenshot of Sciter made when it is playing video (standard 30 fps rate) under animation and transformation on…
DOM Inspector and “how to remove border from an input element”
This how to remove border from input element is a popular question that I am getting time to time from new users. And there are variations of it about dropdown select button, calendar cell, context menu and so on. In this post I’d like to explain general method of solving such problems instead of answering…
Mac OSX, DPI and font sizes mess
Most of applications on Mac OS X use fixed 72 DPI settings despite of all these Retina and other high-DPI monitors. I understand that this is legacy we’ve got from last century. But c’mon, it is 2014 out there … Even conventional browsers that supposed to handle scaling well by using CSS rules are failing…
Model-View-Whatever, the Plus engine for Sciter.
Preface I would say that human history is a history of reinventing "wheels" of various kinds. This time we see concept of data binding reincarnated with slightly pathetic name Model-View-Controller. Of course, as many people as many meaning they give to the MVC abbreviation but, nevertheless, it is all around basic idea of data binding…
MVC or not MVC? The Formation Engine for jQuery
Various JavaScript frameworks provide data binding facilities (Knockout, AngularJS, etc.) these days. They are based on kind-of-MVC concept: you have some data (structure, model), view rendering that data in html and some code in between that commonly named as controllers. How successful/convenient those frameworks are subject of separate topic. For me they are too intrusive…