Skip to content

Commit

Permalink
feat: use o-private-foundation's o-normalise
Browse files Browse the repository at this point in the history
  • Loading branch information
frshwtr committed Nov 7, 2024
1 parent a27875a commit ddd6376
Show file tree
Hide file tree
Showing 57 changed files with 134 additions and 108 deletions.
9 changes: 4 additions & 5 deletions components/ft-concept-button/main.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@use '@financial-times/o-private-foundation/o-normalise/src/scss/mixins' as *;
@import '@financial-times/o-typography/main';
@financial-times/o-normalise/main
@import '@financial-times/o-fonts/main';

/// @access private
$_ftConceptButtonThemes: (
link: (
Expand Down Expand Up @@ -129,8 +128,8 @@ $_ftConceptButtonThemes: (

@mixin _ftConceptButtonTheme($theme: standard, $with-toggle-icon: false) {
@include _ftConceptButtonWithTheme($theme) {
@include oNormaliseFocusApply() {
@include oNormaliseFocusContentForElementColour(
@include oPrivateNormaliseFocusApply() {
@include oPrivateNormaliseFocusContentForElementColour(
_ftConceptButtonGetThemeColor(background)
);
}
Expand Down Expand Up @@ -203,7 +202,7 @@ $_ftConceptButtonThemes: (
}

.ft-concept-button__announcement {
@include oNormaliseVisuallyHidden();
@include oPrivateNormaliseVisuallyHidden();
}

@each $theme in map-keys($_ftConceptButtonThemes) {
Expand Down
2 changes: 1 addition & 1 deletion components/ft-concept-button/stories/concept-button.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "@financial-times/o-fonts/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import "@financial-times/o-normalise/main";
@include oFonts();
@include oNormalise();

Expand Down
2 changes: 1 addition & 1 deletion components/n-notification/demos/src/main.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$n-notification-is-silent: false;
@import "../../main";
@import "@financial-times/o-buttons/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import "@financial-times/o-normalise/main";
@import '@financial-times/o-fonts/main';

@include oButtons();
Expand Down
2 changes: 1 addition & 1 deletion components/o-autocomplete/demos/src/shared.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../../main';
@import "@financial-times/o-private-foundation/o-normalise/main";
@import "@financial-times/o-normalise/main";
@import "@financial-times/o-forms/main";

@include oNormalise();
Expand Down
4 changes: 2 additions & 2 deletions components/o-autocomplete/main.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@use '@financial-times/o-private-foundation/o-normalise/src/scss/_mixins';
@import '@financial-times/math';
@import '@financial-times/o-brand/main';
@import '@financial-times/o-colors/main';
@import '@financial-times/o-grid/main';
@import '@financial-times/o-icons/main';
@import '@financial-times/o-loading/main';
@financial-times/o-normalise/main
@import '@financial-times/o-spacing/main';
@import '@financial-times/o-typography/main';
@import '@financial-times/o-visual-effects/main';
Expand Down Expand Up @@ -33,7 +33,7 @@
}

.o-autocomplete__visually-hidden {
@include oNormaliseVisuallyHidden;
@include oPrivateNormaliseVisuallyHidden;
}

.o-autocomplete__clear {
Expand Down
2 changes: 1 addition & 1 deletion components/o-banner/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@include oBanner();
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();

body {
Expand Down
3 changes: 2 additions & 1 deletion components/o-banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"@financial-times/o-icons": "^7.0.1",
"@financial-times/o-spacing": "^3.0.0",
"@financial-times/o-typography": "^7.4.1",
"@financial-times/o-visual-effects": "^4.0.1"
"@financial-times/o-visual-effects": "^4.0.1",
"@financial-times/o-private-foundation": "0.0.0"
},
"devDependencies": {
"@financial-times/o-fonts": "^5",
Expand Down
5 changes: 3 additions & 2 deletions components/o-banner/src/scss/themes/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use '@financial-times/o-private-foundation/o-normalise/src/scss/mixins' as *;
@mixin _oBannerTheme($theme, $include-layout-styles: true) {

// Get and default the colour-based theme properties. Link, button, and rule
Expand Down Expand Up @@ -78,8 +79,8 @@
.o-banner__close {
@include oIconsContent('cross', $text-color, $size: $_o-banner-close-button-size);

@include oNormaliseFocusApply() {
@include oNormaliseFocusContentForElementColour($text-color);
@include oPrivateNormaliseFocusApply() {
@include oPrivateNormaliseFocusContentForElementColour($text-color);
};
}

Expand Down
2 changes: 1 addition & 1 deletion components/o-banner/stories/banner.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "@financial-times/o-fonts/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import "@financial-times/o-normalise/main";
@include oFonts();
@include oNormalise();

Expand Down
2 changes: 1 addition & 1 deletion components/o-big-number/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
@include oBigNumber();
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();
2 changes: 1 addition & 1 deletion components/o-big-number/stories/big-number.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
@include oBigNumber();
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();
2 changes: 1 addition & 1 deletion components/o-buttons/demos/src/demo.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "../../main";
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();

html {
Expand Down
4 changes: 2 additions & 2 deletions components/o-buttons/main.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@use '@financial-times/o-private-foundation/o-normalise/src/scss/mixins' as *;
@import '@financial-times/o-brand/main';
@import '@financial-times/o-colors/main';
@import '@financial-times/o-typography/main';
@import '@financial-times/o-icons/main';
@financial-times/o-normalise/main

@import './src/scss/brand';
@import './src/scss/variables';
Expand Down Expand Up @@ -97,7 +97,7 @@
}

.o-buttons-icon__label {
@include oNormaliseVisuallyHidden();
@include oPrivateNormaliseVisuallyHidden();
}
}

Expand Down
3 changes: 2 additions & 1 deletion components/o-buttons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"@financial-times/o-colors": "^6.5.0",
"@financial-times/o-icons": "^7.0.0",
"@financial-times/o-normalise": "^3.3.0",
"@financial-times/o-typography": "^7.4.1"
"@financial-times/o-typography": "^7.4.1",
"@financial-times/o-private-foundation": "0.0.0"
},
"devDependencies": {
"@financial-times/o-fonts": "^5.2.0",
Expand Down
5 changes: 3 additions & 2 deletions components/o-buttons/src/scss/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use '@financial-times/o-private-foundation/o-normalise/src/scss/mixins' as *;
/// @output Styles for a custom button theme `.o-buttons--[$name]`.
/// @example - Add a new claret theme for both primary and secondary buttons.
/// // Outputs class .o-buttons--my-special-button
Expand Down Expand Up @@ -243,8 +244,8 @@
text-decoration: none;
}

@include oNormaliseFocusApply() {
@include oNormaliseFocusContentForElementColour(map-get($button-colors-map, 'focus-background'));
@include oPrivateNormaliseFocusApply() {
@include oPrivateNormaliseFocusContentForElementColour(map-get($button-colors-map, 'focus-background'));
background-color: map-get($button-colors-map, 'focus-background');
color: map-get($button-colors-map, 'focus-color');
border-color: map-get($button-colors-map, 'focus-border');
Expand Down
2 changes: 1 addition & 1 deletion components/o-buttons/stories/button.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '@financial-times/o-fonts/main';
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oFonts();
@include oNormalise();

Expand Down
2 changes: 1 addition & 1 deletion components/o-colors/demos/src/color-mixer/color-mixer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@include oColors();
@import '@financial-times/o-forms/main';
@include oForms();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();
@import '@financial-times/o-syntax-highlight/main';
@include oSyntaxHighlight();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@include oTabs();
@import '@financial-times/o-forms/main';
@include oForms();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();
@import '@financial-times/o-buttons/main';
@include oButtons();
Expand Down
2 changes: 1 addition & 1 deletion components/o-colors/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@include oColors();
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import "@financial-times/o-normalise/main";
@include oNormalise();


Expand Down
2 changes: 1 addition & 1 deletion components/o-comments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@financial-times/o-colors": "^6.5.0",
"@financial-times/o-editorial-typography": "^2.0.1",
"@financial-times/o-forms": "^9.2.0",
"@financial-times/o-normalise": "^3.3.0",
"@financial-times/o-private-foundation": "0.0.0",
"@financial-times/o-overlay": "^4.2.1",
"@financial-times/o-spacing": "^3.0.0",
"@financial-times/o-typography": "^7.4.1",
Expand Down
3 changes: 2 additions & 1 deletion components/o-comments/src/scss/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use '@financial-times/o-private-foundation/o-normalise/src/scss/_mixins.scss' as *;
/// Output All oComments Features
@mixin oComments($opts: ('coral-talk-iframe': true)) {

Expand Down Expand Up @@ -45,7 +46,7 @@
}

.o-comments__edit-display-name-descriptive {
@include oNormaliseVisuallyHidden();
@include oPrivateNormaliseVisuallyHidden();
}

.o-overlay.o-comments__displayname-prompt {
Expand Down
2 changes: 1 addition & 1 deletion components/o-cookie-message/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@include oCookieMessage();
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();

body {
Expand Down
2 changes: 1 addition & 1 deletion components/o-cookie-message/stories/cookie-message.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "@financial-times/o-fonts/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import "@financial-times/o-normalise/main";
@include oFonts();
@include oNormalise();

Expand Down
2 changes: 1 addition & 1 deletion components/o-editorial-layout/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
@include oGrid();
@import '@financial-times/o-colors/main';
@include oColors();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '@financial-times/o-fonts/main';
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oFonts();
@include oNormalise();

Expand Down
2 changes: 1 addition & 1 deletion components/o-expander/demos/src/demo.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "./../../main";

@include oExpander();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();

.o-expander--initialized[data-o-expander-shrink-to="height"] .o-expander__content {
Expand Down
4 changes: 2 additions & 2 deletions components/o-expander/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "@financial-times/o-private-foundation/o-normalise/src/scss/mixins";
@import "@financial-times/o-icons/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import 'src/scss/variables';

/// @outputs All o-expander CSS, including the expander content area and toggle.
Expand Down Expand Up @@ -72,7 +72,7 @@
}

.o-expander__visually-hidden {
@include oNormaliseVisuallyHidden;
@include oPrivateNormaliseVisuallyHidden;
}
}

Expand Down
1 change: 1 addition & 0 deletions components/o-expander/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@financial-times/o-viewport": "^5.0.0"
},
"devDependencies": {
"@financial-times/o-private-foundation": "0.0.0",
"@financial-times/o-normalise": "^3.3.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion components/o-expander/stories/expander.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '@financial-times/o-fonts/main';
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oFonts();
@include oNormalise();

Expand Down
2 changes: 1 addition & 1 deletion components/o-footer-services/demos/src/demo.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../main';
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();

.demo {
Expand Down
2 changes: 1 addition & 1 deletion components/o-footer/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@include oFooter();
@import '@financial-times/o-fonts/main';
@include oFonts();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();

body {
Expand Down
4 changes: 2 additions & 2 deletions components/o-footer/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use "@financial-times/o-private-foundation/o-normalise/src/scss/mixins";
@import '@financial-times/math';
@import "@financial-times/o-private-foundation/o-normalise/main";
@import "@financial-times/o-spacing/main";
@import "@financial-times/o-colors/main";
@import "@financial-times/o-typography/main";
Expand Down Expand Up @@ -109,7 +109,7 @@
}

.o-footer-visually-hidden {
@include oNormaliseVisuallyHidden();
@include oPrivateNormaliseVisuallyHidden();
}
}

Expand Down
3 changes: 2 additions & 1 deletion components/o-footer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
},
"devDependencies": {
"@financial-times/o-fonts": "^5.2.0",
"@financial-times/o-normalise": "^3.3.0"
"@financial-times/o-normalise": "^3.3.0",
"@financial-times/o-private-foundation": "0.0.0"
},
"engines": {
"npm": ">7"
Expand Down
2 changes: 1 addition & 1 deletion components/o-forms/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@include oFonts();
@import '@financial-times/o-buttons/main';
@include oButtons();
@financial-times/o-normalise/main
@import '@financial-times/o-normalise/main';
@include oNormalise();
body {
background: oColorsByUsecase(page, background);
Expand Down
6 changes: 3 additions & 3 deletions components/o-forms/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@import '@financial-times/o-grid/main';
@import '@financial-times/o-icons/main';
@import '@financial-times/o-loading/main';
@financial-times/o-normalise/main
@use '@financial-times/o-private-foundation/o-normalise/src/_mixins.scss' as *;
@import '@financial-times/o-typography/main';

@import 'src/scss/main';
Expand Down Expand Up @@ -82,8 +82,8 @@
}
}
.o-forms-field--#{$theme} input {
@include oNormaliseFocusApply() {
@include oNormaliseFocusContentInverse();
@include oPrivateNormaliseFocusApply() {
@include oPrivateNormaliseFocusContentInverse();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/o-forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@financial-times/o-grid": "^6.0.0",
"@financial-times/o-icons": "^7.0.0",
"@financial-times/o-loading": "^5.0.0",
"@financial-times/o-normalise": "^3.3.0",
"@financial-times/o-private-foundation": "0.0.0",
"@financial-times/o-spacing": "^3.0.0",
"@financial-times/o-typography": "^7.4.1",
"@financial-times/o-utils": "^2.2.0"
Expand Down
Loading

0 comments on commit ddd6376

Please sign in to comment.