Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: align o-private-foundation/o-normalise directory structure #1874

Merged
merged 12 commits into from
Nov 26, 2024
2 changes: 1 addition & 1 deletion components/ft-concept-button/main.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
@import '@financial-times/o-typography/main';
@import '@financial-times/o-fonts/main';
/// @access private
Expand Down
2 changes: 1 addition & 1 deletion components/o-autocomplete/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@import '@financial-times/o-grid/main';
@import '@financial-times/o-icons/main';
@import '@financial-times/o-loading/main';
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
@import '@financial-times/o-spacing/main';
@import '@financial-times/o-typography/main';
@import '@financial-times/o-visual-effects/main';
Expand Down
2 changes: 1 addition & 1 deletion components/o-banner/src/scss/themes/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
@mixin _oBannerTheme($theme, $include-layout-styles: true) {

// Get and default the colour-based theme properties. Link, button, and rule
Expand Down
2 changes: 1 addition & 1 deletion components/o-expander/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "@financial-times/o-icons/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
@import 'src/scss/variables';

/// @outputs All o-expander CSS, including the expander content area and toggle.
Expand Down
2 changes: 1 addition & 1 deletion components/o-footer/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import "@financial-times/o-spacing/main";
@import "@financial-times/o-colors/main";
@import "@financial-times/o-typography/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
@import "@financial-times/o-icons/main";
@import "@financial-times/o-grid/main";

Expand Down
2 changes: 1 addition & 1 deletion components/o-forms/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@import '@financial-times/o-grid/main';
@import '@financial-times/o-icons/main';
@import '@financial-times/o-loading/main';
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
@import '@financial-times/o-typography/main';

@import 'src/scss/main';
Expand Down
2 changes: 1 addition & 1 deletion components/o-forms/src/scss/_radio-box.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';

// sass-lint:disable no-qualifying-elements
/// @access private
Expand Down
2 changes: 1 addition & 1 deletion components/o-forms/src/scss/_toggle.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
// sass-lint:disable selector-no-qualifying-type
/// @access private
/// @param {Boolean} $disabled Whether to output disabled state styling
Expand Down
35 changes: 12 additions & 23 deletions components/o-forms/src/scss/modifiers/_inverse.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
/// @access private
/// @param {Boolean} $error-summary Whether to output inverse error summary styling
/// @param {Boolean} $radio Whether to output inverse radio input styling
Expand Down Expand Up @@ -36,12 +36,10 @@
}
}

input[type='checkbox'] {
// stylelint-disable-line selector-no-qualifying-type
input[type='checkbox'] { // stylelint-disable-line selector-no-qualifying-type
&:focus {
@include oPrivateNormaliseFocusUnsetContent();
& + .o-forms-input__label:before {
// stylelint-disable-line selector-no-qualifying-type
& + .o-forms-input__label:before { // stylelint-disable-line selector-no-qualifying-type
@include oPrivateNormaliseFocusContentInverse();
}
}
Expand All @@ -52,29 +50,24 @@
// `:focus` fallback, however some of our supported browsers
// do not understand `@supports: selector()`.
@supports selector(:focus-visible) {
&:focus + .o-forms-input__label:before {
// stylelint-disable-line selector-no-qualifying-type
&:focus + .o-forms-input__label:before { // stylelint-disable-line selector-no-qualifying-type
@include oPrivateNormaliseFocusUnsetContent();
}

&:focus-visible {
& + .o-forms-input__label:before {
// stylelint-disable-line selector-no-qualifying-type
& + .o-forms-input__label:before { // stylelint-disable-line selector-no-qualifying-type
@include oPrivateNormaliseFocusContentInverse();
}
}
}
}

input[type='checkbox']:checked {
// stylelint-disable-line selector-no-qualifying-type
+ .o-forms-input__label:before {
// stylelint-disable-line selector-no-qualifying-type
input[type='checkbox']:checked { // stylelint-disable-line selector-no-qualifying-type
+ .o-forms-input__label:before { // stylelint-disable-line selector-no-qualifying-type
background-color: _oFormsGet('toggle-inverse-selected');
}

+ .o-forms-input__label:after {
// stylelint-disable-line selector-no-qualifying-type
+ .o-forms-input__label:after { // stylelint-disable-line selector-no-qualifying-type
@include oIconsContent(
'tick',
$size: null,
Expand Down Expand Up @@ -114,12 +107,10 @@
background-color: oColorsByName('white');
}

.o-forms-input--radio-box input[type='radio'] {
// stylelint-disable-line selector-no-qualifying-type
.o-forms-input--radio-box input[type='radio'] { // stylelint-disable-line selector-no-qualifying-type
&:focus {
@include oPrivateNormaliseFocusUnsetContent();
& + .o-forms-input__label {
// stylelint-disable-line selector-no-qualifying-type
& + .o-forms-input__label { // stylelint-disable-line selector-no-qualifying-type
@include oPrivateNormaliseFocusContentInverse();
}
}
Expand All @@ -130,14 +121,12 @@
// `:focus` fallback, however some of our supported browsers
// do not understand `@supports: selector()`.
@supports selector(:focus-visible) {
&:focus + .o-forms-input__label {
// stylelint-disable-line selector-no-qualifying-type
&:focus + .o-forms-input__label { // stylelint-disable-line selector-no-qualifying-type
@include oPrivateNormaliseFocusUnsetContent();
}

&:focus-visible {
& + .o-forms-input__label {
// stylelint-disable-line selector-no-qualifying-type
& + .o-forms-input__label { // stylelint-disable-line selector-no-qualifying-type
@include oPrivateNormaliseFocusContentInverse();
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/o-forms/src/scss/modifiers/_state.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';

/// @access private
/// @output styles for state animation for the box-styled radio inputs
Expand Down
2 changes: 1 addition & 1 deletion components/o-ft-affiliate-ribbon/main.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "@financial-times/o-colors/main";
@import "@financial-times/o-grid/main";
@import "@financial-times/o-private-foundation/o-normalise/main";
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';

@import "src/scss/variables";
@import "src/scss/mixins";
Expand Down
2 changes: 1 addition & 1 deletion components/o-header-services/src/scss/_base.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '@financial-times/o-private-foundation/o-normalise/main';
@import '@financial-times/o-private-foundation/src/scss/o-normalise/main';
/// @access private
/// @param {Boolean} $bleed [whether or not to make the header a bleed header. Defaults to false.]
/// @outputs base styles for full header
Expand Down
2 changes: 0 additions & 2 deletions components/o-header/src/scss/_base.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


@mixin _oHeaderBase() {
.o-header {
position: relative;
Expand Down
12 changes: 2 additions & 10 deletions components/o-header/src/scss/features/_drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
border-right: 1px solid _oHeaderGet('drawer-border');
// use a 2D transform because 3D are unsupported by IE9
transform: translateX(-100%);
transform: translate3d(
-100%,
0,
0
); // stylelint-disable-line declaration-block-no-duplicate-properties
transform: translate3d(-100%, 0, 0); // stylelint-disable-line declaration-block-no-duplicate-properties

// this is literally the specification example for will-change
will-change: transform;
Expand All @@ -38,11 +34,7 @@
&.o-header__drawer--open {
// use a 2D transform because 3D are unsupported by IE9
transform: translateX(0);
transform: translate3d(
0,
0,
0
); // stylelint-disable-line declaration-block-no-duplicate-properties
transform: translate3d(0, 0, 0); // stylelint-disable-line declaration-block-no-duplicate-properties
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions components/o-header/src/scss/features/_top.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '@financial-times/o-private-foundation/o-normalise/main';

@mixin _oHeaderTop() {
.o-header__top-wrapper {
display: grid;
Expand Down
2 changes: 1 addition & 1 deletion components/o-multi-select/demos/src/demo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@include oForms();

body {
background: oColorsByUsecase(page, background);
background: oColorsByUsecase(page, background);
}

@include oMultiSelect();
Loading
Loading