Skip to content

Commit

Permalink
fix: move deprecation notices from output CSS to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon authored and AuroDesignSystem committed Feb 4, 2020
1 parent c23f3e9 commit 8ee6330
Show file tree
Hide file tree
Showing 21 changed files with 335 additions and 115 deletions.
238 changes: 164 additions & 74 deletions docs/index.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions scripts/testBuild.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,8 @@ $auro-inset-directions: --stretch;
@import './src/componentSupport/tablist';

@import './src/formElements/inputTypeText';

.deprecated-mixins {
@include auro_focus-button(css);
@include transition;
}
4 changes: 4 additions & 0 deletions src/_animation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// ---------------------------------------------------------------------

@import "./libSupport/deprecated";

/// Will be removed with upcoming MAJOR release
///
/// @group †deprecated
Expand All @@ -16,6 +18,8 @@
/// @output Simple method of animating certain properties of an element, with ability to define property, duration, delay and timing function.

@mixin transition($property: $animation-default-property, $duration: $animation-default-duration, $timing: $animation-default-timing, $delay: null) {
@include deprecated('mixin transition()');

transition: $property $duration $timing $delay;
}

Expand Down
24 changes: 24 additions & 0 deletions src/_baseline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// ---------------------------------------------------------------------

@import "./libSupport/deprecated";

// sass-lint:disable mixins-before-declarations variable-for-property no-vendor-prefixes

@import "baselineLTE";
Expand All @@ -15,6 +17,8 @@
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
html {
@include deprecated('selctor html');

-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
box-sizing: border-box;
Expand All @@ -30,6 +34,8 @@ html {
///
body,
.baseType {
@include deprecated('selctors body, .baseType');

margin: 0;
font-family: $auro-font-family-default;
font-weight: $weight-book;
Expand All @@ -48,6 +54,8 @@ body,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.baseParagraph {
@include deprecated('selctor .baseParagraph');

margin-bottom: $size-margin-baseline;

.hyperlink {
Expand All @@ -65,6 +73,8 @@ body,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.hyperlink {
@include deprecated('selctor .hyperlink');

color: $color-type-theme-light-link;
padding: 0 $size-scale-sml;
text-decoration: none;
Expand Down Expand Up @@ -118,6 +128,8 @@ body,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
img {
@include deprecated('selctor img');

max-width: 100%;
}

Expand All @@ -132,6 +144,8 @@ img {
///
small,
.type--small {
@include deprecated('selctors small, .type--small');

font-size: $size-font-breakpoint-all-small;
}

Expand All @@ -145,6 +159,8 @@ small,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.heading {
@include deprecated('selctor .heading');

margin: $size-margin-header-y-axis $size-margin-header-x-axis;
font-weight: inherit;
line-height: $vertical-alignment-heading;
Expand All @@ -161,6 +177,8 @@ small,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.heading--max {
@include deprecated('selctor .heading--max');

font-size: $size-font-breakpoint-mobile-max;
margin-top: 0;

Expand All @@ -179,6 +197,8 @@ small,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.heading--xxl {
@include deprecated('selctor .heading--xxl');

font-size: $size-font-breakpoint-mobile-xxl;

@include breakpoint-medium {
Expand All @@ -196,6 +216,8 @@ small,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.heading--xl {
@include deprecated('selctor .heading--xl');

font-size: $size-font-breakpoint-mobile-xl;

@include breakpoint-medium {
Expand All @@ -213,6 +235,8 @@ small,
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/baseline";
///
.heading--lg {
@include deprecated('selctor .heading--lg');

font-size: $size-font-breakpoint-mobile-lg;

@include breakpoint-medium {
Expand Down
6 changes: 6 additions & 0 deletions src/_baselineLTE.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// ---------------------------------------------------------------------

@import "./libSupport/deprecated";

// sass-lint:disable mixins-before-declarations

/// Global selector to address box-model and default `:focus` pseudo elements.
Expand All @@ -17,6 +19,8 @@
&,
&:before,
&:after {
@include deprecated('file baselineLTE');

box-sizing: border-box;
}

Expand All @@ -36,5 +40,7 @@
/// @group †deprecated
/// @deprecated see `core.scss`
.focus-visible :focus:not(.focus-visible) {
@include deprecated('file baselineLTE');

outline: none;
}
16 changes: 16 additions & 0 deletions src/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// ---------------------------------------------------------------------

@import "./libSupport/deprecated";

// The following mixins provide pre-configured Orion approved
// breakpoints when development mobile-first UIs.

Expand Down Expand Up @@ -31,6 +33,8 @@
/// }
/// }
@mixin phone-large {
@include deprecated('mixin phone-large()');

@media screen and (min-width: $breakpoint-width-narrow) and (max-width: $breakpoint-width-medium - 1px) {
@content;
}
Expand Down Expand Up @@ -61,6 +65,8 @@
/// }
/// }
@mixin tablet {
@include deprecated('mixin tablet()');

@media screen and (min-width: $breakpoint-width-medium) and (max-width: $breakpoint-width-wide - 1px) {
@content;
}
Expand Down Expand Up @@ -91,6 +97,8 @@
/// }
/// }
@mixin breakpoint-max {
@include deprecated('mixin breakpoint-max()');

@media screen and (min-width: $breakpoint-width-max) {
@content;
}
Expand Down Expand Up @@ -123,6 +131,8 @@
/// }
/// }
@mixin breakpoint-wide {
@include deprecated('mixin breakpoint-wide()');

@media screen and (min-width: $breakpoint-width-wide) {
@content;
}
Expand Down Expand Up @@ -153,6 +163,8 @@
/// }
/// }
@mixin breakpoint-medium {
@include deprecated('mixin breakpoint-medium()');

@media screen and (min-width: $breakpoint-width-medium) {
@content;
}
Expand Down Expand Up @@ -183,6 +195,8 @@
/// }
/// }
@mixin breakpoint-narrow {
@include deprecated('mixin breakpoint-narrow()');

@media screen and (min-width: $breakpoint-width-narrow) {
@content;
}
Expand Down Expand Up @@ -220,6 +234,8 @@
/// }
/// }
@mixin breakpoint($breakpointValue, $mediaFeature: min-width) {
@include deprecated('mixin breakpoint()');

@media screen and (#{$mediaFeature}: $breakpointValue) {
@content;
}
Expand Down
6 changes: 6 additions & 0 deletions src/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// ---------------------------------------------------------------------

@import "./libSupport/deprecated";

// sass-lint:disable no-duplicate-properties

// @font-face is not supported in SassDocs
Expand All @@ -13,6 +15,8 @@
/// @example scss - import src file
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/fonts";
@font-face {
@include deprecated('legacy @font-face setup');

font-family: $asset-font-circular-family-name;
src: url("https://resource.alaskaair.net/-/media/4E8D77C0D7A8411AB9C351C1EFF86681.woff2") format("woff2"),
url("https://resource.alaskaair.net/-/media/CAAEEC88586944808EDE9B36A3460098.woff") format("woff");
Expand Down Expand Up @@ -52,6 +56,8 @@
/// @example scss - import src file
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/fonts";
@font-face {
@include deprecated('legacy @font-face setup');

font-family: $asset-font-circular-family-name;
src: url("https://resource.alaskaair.net/-/media/1DD02F55437F4346B7EF7D5A08326D71.woff2") format("woff2"),
url("https://resource.alaskaair.net/-/media/2339807B68A344348447336D15035425.woff") format("woff");
Expand Down
7 changes: 5 additions & 2 deletions src/componentSupport/_anchor-roleButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

// ---------------------------------------------------------------------

@import "../libSupport/deprecated";
@import "../libSupport/manageScope";

// Wrapper class around anchor-roleButton utility mixin

// This selector is NOT auto included with any other web code style sheet.
// If the ods-roleButton selector is reuqired, it is to be individually included.

@import "../libSupport/manageScope";
@import "../utilityMixins/anchor-roleButton";

/// `.ods-roleButton` is a helper class to support the UI of a hyperlink using `role="button"`
Expand All @@ -18,7 +20,8 @@
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/componentSupport/anchor-roleButton";

.ods-roleButton {
/* deprecated See `.auro_roleButton` */
@include deprecated('selctor .ods-roleButton');

@include anchorButton(sass, noncomponent);
}

Expand Down
10 changes: 6 additions & 4 deletions src/componentSupport/_anchor-roleTab.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@

// ---------------------------------------------------------------------

@import "../libSupport/deprecated";
@import "../libSupport/manageScope";
@import "../utilityMixins/anchor-roleTab";

// Wrapper class around anchor-roleTab utility mixin

// This selector is NOT auto included with any other web code style sheet.
// If the ods-roleTab selector is reuqired, it is to be individually included.

@import "../libSupport/manageScope";
@import "../utilityMixins/anchor-roleTab";

/// `.ods-roleTab` is a helper class to support the UI of a hyperlink using `role="tab"`
/// @group †deprecated
/// @deprecated see `.auro_roleTab`
/// @example scss - import selector file
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/componentSupport/anchor-roleTab";

.ods-roleTab {
/* deprecated see `.auro_roleTab` */
@include deprecated('selctor .ods-roleTab');

@include anchorTab(sass, noncomponent);
margin-right: calc(#{$size-scale-micro} * -1);
}
Expand Down
8 changes: 5 additions & 3 deletions src/componentSupport/_containedButtons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

// ---------------------------------------------------------------------

@import "../libSupport/deprecated";
@import "../libSupport/manageScope";

// Wrapper class around the use of ods-hyperlink role=button and ods-button.

// This selector is NOT auto included with any other web core style sheet.

@import "../libSupport/manageScope";

// sass-lint:disable no-mergeable-selectors
/* stylelint-disable selector-type-no-unknown */

Expand All @@ -26,7 +27,8 @@


.ods-containedButtons {
/* deprecated see `.auro_containedButtons` */
@include deprecated('selctor .ods-containedButtons');

display: flex;
flex-direction: column;

Expand Down
8 changes: 5 additions & 3 deletions src/componentSupport/_tablist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

// ---------------------------------------------------------------------

@import "../libSupport/deprecated";
@import "../libSupport/manageScope";

// Wrapper class around the use of hyperlink role=tab

// This selector is NOT auto included with any other web core style sheet.

@import "../libSupport/manageScope";

/// `.ods-tablist` is a helper class to support the UI of a hyperlink using `role="tab"`
///
/// Place selector on outer `div` or `section` container with the `role="tablist"` also applied.
Expand All @@ -18,7 +19,8 @@
/// @import "./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/componentSupport/tablist";

.ods-tablist {
/* deprecated see `.auro_tablist` */
@include deprecated('selctor .ods-tablist');

@include breakpoint-narrow {
overflow-y: unset;
white-space: unset;
Expand Down
4 changes: 4 additions & 0 deletions src/formElements/_inputTypeText.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// ---------------------------------------------------------------------

@import "../libSupport/deprecated";

/// @group †deprecated
/// @deprecated Will be removed with upcoming MAJOR release, please reference the [inputtext](https://github.com/AlaskaAirlines/OrionStatelessComponents__ods-inputtext) element for more information
/// @example scss - import selector file with parent wrapper
Expand All @@ -12,6 +14,8 @@
input[type=text],
input[type=password],
input[type=email] {
@include deprecated('selectors for inputTypeText');

border-width: 0 0 1px 0;
border-color: $color-base-shark;
border-style: solid;
Expand Down
3 changes: 3 additions & 0 deletions src/libSupport/_deprecated.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@mixin deprecated($string) {
@warn "Deprecated: #{$string}. Please see [ https://git.io/JvGYJ ] for more information."
}
Loading

0 comments on commit 8ee6330

Please sign in to comment.