Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Typography: Create style from caret position (rules)

Abekonge edited this page Jun 10, 2014 · 2 revisions

The "save as style"-option is triggered when there is inline styling on something selected either by the caret or by selection-start.

Save as character style Get the inline styling, save it. If there is any inline padding, margin og line-height, remove it.

Save as block style Get the inline styling AND the inherited css properties (those from the block level parent).

Overwrite existing style

  1. If the existing style is an inline style: Add/overwrite the inline styling on caret position. If there is any inline padding, margin og line-height, remove it.
  2. If the existing style is a block style: Add overwrite the inline styling on caret position.

When hovering over the different buttons, the properties which will be saved should be highlighted in the Control Panel, with a color.