Skip to content

Commit

Permalink
Merge branch 'main' into DATA-9749
Browse files Browse the repository at this point in the history
  • Loading branch information
danail-s authored Oct 28, 2024
2 parents 74cef45 + 2522906 commit 3ef034b
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"components/o-forms": "9.12.1",
"components/o-ft-affiliate-ribbon": "5.2.2",
"components/o-grid": "6.1.8",
"components/o-header": "14.0.4",
"components/o-header": "14.1.0",
"components/o-header-services": "5.5.4",
"components/o-icons": "7.8.0",
"components/o-labels": "6.5.8",
Expand Down
7 changes: 7 additions & 0 deletions components/o-header/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Changelog
## [14.1.0](https://github.com/Financial-Times/origami/compare/o-header-v14.0.4...o-header-v14.1.0) (2024-10-24)


### Features

* o-header subnav primary styles ([#1853](https://github.com/Financial-Times/origami/issues/1853)) ([421eb30](https://github.com/Financial-Times/origami/commit/421eb3070ba1fc58a35b808f7496b72dd5c849df))

## [14.0.4](https://github.com/Financial-Times/origami/compare/o-header-v14.0.3...o-header-v14.0.4) (2024-09-24)


Expand Down
2 changes: 2 additions & 0 deletions components/o-header/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Some elements inside the header require specific data attributes so the JavaScri
- data-o-header-subnav-wrapper: Applied to the inner wrapper `div` of the subnav menu so the JS can handle the scrolling
- data-o-header-search-state: Optional, may be "open" or "close" to indicate the default visibility of the search bar.

The sub navigation header can be used with a modifer class `o-header__subnav--primary` to achieve styles consistent with the main navigation where item links are bold and capitalised and the background colour is `paper`.

## JavaScript

An o-header object must be constructed for every `<header>` you have on your page that uses this component.
Expand Down
2 changes: 1 addition & 1 deletion components/o-header/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@financial-times/o-header",
"version": "14.0.4",
"version": "14.1.0",
"description": "Responsive Financial Times page header with primary and secondary navigation, a drop down mega menu, and a collapsible drawer",
"keywords": [
"header",
Expand Down
10 changes: 9 additions & 1 deletion components/o-header/src/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,12 @@
content: '';
margin: -10px; // Undo in-built icon whitespace.
}
}
}

@mixin _oHeaderPrimaryLink() {
font-weight: 600;
text-transform: uppercase;
// sass-lint:disable no-vendor-prefixes
-webkit-font-smoothing: antialiased;
// sass-lint:enable no-vendor-prefixes
}
6 changes: 1 addition & 5 deletions components/o-header/src/scss/features/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@
}

.o-header__nav-link--primary {
font-weight: 600;
text-transform: uppercase;
// sass-lint:disable no-vendor-prefixes
-webkit-font-smoothing: antialiased;
// sass-lint:enable no-vendor-prefixes
@include _oHeaderPrimaryLink;
}
}
8 changes: 8 additions & 0 deletions components/o-header/src/scss/features/_subnav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
border-bottom: 1px solid _oHeaderGet('subnav-border');
}

.o-header__subnav--primary {
background-color: _oHeaderGet('header-background');

.o-header__subnav-link {
@include _oHeaderPrimaryLink;
}
}

.o-header__subnav-wrap-outside {
margin-left: -$_o-header-sub-header-focus-margin;
margin-right: -$_o-header-sub-header-focus-margin;
Expand Down

0 comments on commit 3ef034b

Please sign in to comment.