Skip to content

Preserve <title> element position #177

@ultraq

Description

@ultraq

Right now, the layout dialect always puts the <title> element as the first element in a <head> block because (if I remember right) it makes the code a lot easier to work with separating this element that has a lot of special rules (because of all the title merging jazz that happens) from everything else. This does mean that its reordering a dev's markup, which is not ideal.

<head> element merging shouldn't do this, instead letting the merge strategy that has been configured decide the position of the element instead.

Some things to consider:

  • Often there's a <title> in both the layout and view. With the default merging strategy, if the view has a title then it'll be placed after everything else. Should that then mean the merged title be placed there?
  • Although I don't know of anything that relies on the title being first, this could be a breaking change! If so, then maybe I should introduce a new merging strategy that retains this behaviour (a "title first appending" strategy?) and make that the default on release, but note that on the next major version that behaviour will change to a plain old appending merge strategy.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions