gillish

Style a block in the Styles tab

Cairnstone’s Styles tab styles any block A piece of a page, such as a paragraph, a picture or a button. In WordPress you build a page by putting blocks one after another. in the Block workspace, blocks from other plugins An add-on you install in WordPress to give your site new features. Gillish Cairnstone and Gillish Core are plugins. too. Open it in the sidebar. A block can have one look at rest and another when a visitor points at it, tabs to it, presses it, or when it is turned off.

Style a block

  1. In the Block workspace, select the block.

  2. Open the Styles tab in the sidebar.

  3. Pick a state at the top: Default, Hover, Focus, Active or Disabled.

  4. Set the controls below. A small dot lights on each state that has its own look.

  5. Save the block. Point at it on the canvas to see its Hover look. To see Focus, Active or Disabled, pick that state at the top.

The Styles tab for a Button with the Hover state picked and the colour sets below it.
The Styles tab, here on the Hover state.

The states

  • Default: the look at rest. Every other state starts from it and changes only what you set.
  • Hover: while the visitor’s mouse is over the block.
  • Focus: when a block that can take keyboard focus, such as a button or a link, is reached with the keyboard. A paragraph or a box never gets it.
  • Active: while the visitor clicks or presses the block.
  • Disabled: when the block is marked as turned off. The mouse and keyboard never set it.

The controls

Every control can differ per state, unless the line says otherwise.

  • Colour set: a named set (Blue, Red, Amber, Contrast and Neutral, with Deep Blue, Deep Red and Deep Amber for dark pages, and your own from Site defaults) that sets background, text and link colour in one pick. Neutral has no colours of its own and follows your page. Inside any set, links in the text are underlined, also when your theme The design of your whole site: its fonts, colours and where the menu and footer go. You pick it under Appearance, then Themes. removes underlines. Change any single colour after.
  • Background, Text and Link colour, each on its own: a swatch from your theme (the block follows the theme) or Custom (the block keeps the colour you choose). See Follow the theme, or set your own. A block with no link, such as a Button, has no Link colour.
  • Typography: Theme size picks one of your theme’s text sizes and follows the theme, like a theme colour; choose Custom, or type a number in Font size, for a size of your own. Then font, weight, size, line height, letter spacing, first-line indent, underline, capitals and italic; text alignment that follows the reading direction; Scale text with screen size; Drop cap on a paragraph, with its size in lines; on the Button block, Vertical text and Rotate text; Content position (top, middle or bottom of the box); Text balancing for headings; the style, colour, thickness and offset of an underline or strikethrough; and Limit lines, which cuts the lead paragraph after a number of lines so cards stay the same height.
  • Border and Outline: border width, style, colour and opacity, for all sides or each side, with a corner radius for all corners or each one; and an outline just outside the block that takes no space, with width, style, colour and offset. Useful as a hover or focus ring.
  • Shadows: a Drop shadow outside the box (Soft, Medium, Strong, Glow, your own, or Custom with offset, blur, spread and colour), an Inner shadow for a pressed-in look, a Text shadow on the text, and an Elevation list: None, Low, Medium, High or Floating.
  • Filters: blur, brightness, contrast, saturation, grayscale, sepia and invert, and Background blur for a frosted-glass look behind a see-through block. Each state can have its own.
  • Media fit (image / video), on the Image block, under Size & spacing: Cover (crop to fill), Contain (fit, no crop), Fill (stretch), None or Scale down, with a focal point for Cover and Contain that stays in view. One setting for the whole block.
  • Size & spacing: padding and margin per side; type 0 on every side to take the space away, and Reset brings the block’s own back. Minimum height, which can differ per state; Height, Width, Minimum width, Maximum width, Position and Stick to the top; and, for the whole block, Aspect ratio, Overflow (Visible, Hidden, Clip, Scroll or Auto), Stacking order for overlapping blocks and Isolate layer.
  • Block opacity, in the Color section: 0 to 100%.

The Advanced panel adds a Gradient background between two colours at an angle, a Transform (lift, scale and rotation, for example a button that nudges up on hover), and a Transition, one speed for the whole block that makes every change glide. For visitors who asked their device for less motion, the movement snaps into place while colours and shadows still fade.

Follow the theme, or set your own

Every colour and text size you set is one of two kinds. The kind decides what happens when your theme changes later, for example to a new brand colour, a new text size, or a dark or high-contrast style.

  • From the theme, the block follows. Pick a colour from your theme’s swatches, or a size from Theme size. The block keeps the link to the theme, not the colour or size it has today. Change that colour or size in the theme, and every block that uses it changes with it, in every post.
  • Your own, the block stays. Pick Custom and choose a colour, or type a number in Font size, and the block keeps exactly what you set, whatever the theme does later. What you set yourself always wins over the theme, on any block or part.

A Colour set (Blue, Amber and the others) belongs to Cairnstone, not to your theme, so it keeps its colours when the theme changes. Spacing, borders, corners and the rest are always your own numbers. Set nothing, and the block takes the theme’s text colour and font, as any block on the page does.

Choose per block. For a block you place in many posts, theme colours and theme sizes let one change in the theme reach every copy. Use your own value where a block must look the same whatever the theme does. A size typed as a number is your own value, even when it matches a theme size: to make the block follow the theme, pick the swatch or the theme size again. When the theme changes, check that text is still easy to read on its background, because a block that follows the theme takes the new colours without asking.

Sizes and units

Each size field shows its unit on a small button beside it: px, rem, em or %. Type a plain number like 35 and Cairnstone stores the form that grows with a reader’s own text size, and says so under the field. Type 35px to switch unit, or paste a size like 1.5rem. If a field cannot read what you typed, it says so and keeps the old value. Cairnstone → Settings → Site defaults → Working unit sets the unit fields start in.

The weight list shows only the weights your chosen font has. The text sizes you set grow for a reader who has asked their browser for larger text.

What the page gets

Your styles save with the block. Nothing is written to your theme files. At the foot of the tab, the read-only CSS section lists the stable class names the block carries on the published page, each copied with one click, so you can target the block in your own CSS. It reads from the saved block, so it refreshes when you save.

Next, read Make a block react with Interactions.

Trails

Cairnstone