diff --git a/addon/styles/addon.css b/addon/styles/addon.css new file mode 100644 index 000000000..74d5db3d0 --- /dev/null +++ b/addon/styles/addon.css @@ -0,0 +1,153 @@ +.ember-table { + position: relative; + height: 100%; + width: 100%; + box-sizing: border-box; +} + +.ember-table .ember-table-overflow { + overflow: auto; + max-height: 100%; + max-width: 100%; +} + +.ember-table table { + border-spacing: 0; + table-layout: fixed; + box-sizing: border-box; +} + +.ember-table td, +.ember-table th { + box-sizing: border-box; +} + +.ember-table td.is-fixed-left, +.ember-table td.is-fixed-right, +.ember-table th.is-fixed-left, +.ember-table th.is-fixed-right { + position: -webkit-sticky; + position: sticky; + left: 0; +} + +.ember-table td.ember-table__text-align-left, +.ember-table th.ember-table__text-align-left { + text-align: left; +} + +.ember-table td.ember-table__text-align-center, +.ember-table th.ember-table__text-align-center { + text-align: center; +} + +.ember-table td.ember-table__text-align-right, +.ember-table th.ember-table__text-align-right { + text-align: right; +} + +.ember-table th { + z-index: 2; +} + +.ember-table th:not(.is-fixed-right) .et-header-resize-area { + right: 0; +} + +.ember-table th.is-fixed-right .et-header-resize-area { + left: 0; +} + +.ember-table td.is-fixed-left, +.ember-table td.is-fixed-right { + z-index: 3; +} + +.ember-table th.is-fixed-left, +.ember-table th.is-fixed-right { + z-index: 4; +} + +.ember-table th.is-sortable { + cursor: pointer; +} + +.ember-table thead { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 2; + box-sizing: border-box; +} + +.ember-table tbody { + box-sizing: border-box; +} + +.ember-table tfoot { + position: -webkit-sticky; + position: sticky; + bottom: 0; + z-index: 2; + box-sizing: border-box; +} + +.ember-table .scroll-indicator { + position: absolute; + z-index: 5; +} + +.ember-table .scroll-indicator__left, +.ember-table .scroll-indicator__right { + top: 0; + width: 8px; + height: 100%; +} + +.ember-table .scroll-indicator__left { + background: linear-gradient(to right, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); +} + +.ember-table .scroll-indicator__right { + right: 0; + background: linear-gradient(to left, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); +} + +.ember-table .scroll-indicator__top, +.ember-table .scroll-indicator__bottom { + left: 0; + width: 100%; + height: 8px; +} + +.ember-table .scroll-indicator__top { + top: 0; + background: linear-gradient(to bottom, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); +} + +.ember-table .scroll-indicator__bottom { + bottom: 0; + background: linear-gradient(to top, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); +} + +.ember-table.et-unselectable { + user-select: none; +} + +.ember-table .et-header-resize-area { + cursor: col-resize; + width: 10px; + height: 100%; + position: absolute; + top: 0; +} + +.ember-table .et-speech-only { + display: none !important; +} + +@media speech { + .ember-table .et-speech-only { + display: block !important; + } +} diff --git a/addon/styles/addon.scss b/addon/styles/addon.scss deleted file mode 100644 index 038d30380..000000000 --- a/addon/styles/addon.scss +++ /dev/null @@ -1,158 +0,0 @@ -.ember-table { - position: relative; - height: 100%; - width: 100%; - box-sizing: border-box; - - .ember-table-overflow { - overflow: auto; - max-height: 100%; - max-width: 100%; - } - - table { - border-spacing: 0; - table-layout: fixed; - box-sizing: border-box; - } - - td, - th { - box-sizing: border-box; - - &.is-fixed-left, - &.is-fixed-right { - // sass-lint:disable-block no-duplicate-properties - position: -webkit-sticky; - position: sticky; - left: 0; - } - - &.ember-table__text-align-left { - text-align: left; - } - - &.ember-table__text-align-center { - text-align: center; - } - - &.ember-table__text-align-right { - text-align: right; - } - } - - th { - z-index: 2; - - &:not(.is-fixed-right) { - .et-header-resize-area { - right: 0; - } - } - - &.is-fixed-right { - .et-header-resize-area { - left: 0; - } - } - } - - td.is-fixed-left, - td.is-fixed-right { - z-index: 3; - } - - th.is-fixed-left, - th.is-fixed-right { - z-index: 4; - } - - th.is-sortable { - cursor: pointer; - } - - thead { - // sass-lint:disable-block no-duplicate-properties - position: -webkit-sticky; - position: sticky; - - top: 0; - z-index: 2; - box-sizing: border-box; - } - - tbody { - box-sizing: border-box; - } - - tfoot { - // sass-lint:disable-block no-duplicate-properties - position: -webkit-sticky; - position: sticky; - bottom: 0; - z-index: 2; - box-sizing: border-box; - } - - .scroll-indicator { - position: absolute; - z-index: 5; - - &__left, - &__right { - top: 0; - width: 8px; - height: 100%; - } - - &__left { - background: linear-gradient(to right, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); - } - - &__right { - right: 0; - background: linear-gradient(to left, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); - } - - &__top, - &__bottom { - left: 0; - width: 100%; - height: 8px; - } - - &__top { - top: 0; - background: linear-gradient(to bottom, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); - } - - &__bottom { - bottom: 0; - background: linear-gradient(to top, rgba(168, 168, 168, 0.4), rgba(168, 168, 168, 0)); - } - } - - &.et-unselectable { - user-select: none; - } - - .et-header-resize-area { - cursor: col-resize; - - width: 10px; - height: 100%; - - position: absolute; - top: 0; - } - - .et-speech-only { - display: none !important; - } - - @media speech { - .et-speech-only { - display: block !important; - } - } -} diff --git a/package.json b/package.json index 190a232a3..95d49537d 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "ember-cli-htmlbars": "^3.0.1", "ember-cli-htmlbars-inline-precompile": "^2.1.0", "ember-cli-node-assets": "^0.2.2", - "ember-cli-sass": "^10.0.0", "ember-cli-version-checker": "^3.0.1", "ember-compatibility-helpers": "^1.2.0", "ember-raf-scheduler": "^0.2.0", @@ -66,6 +65,7 @@ "ember-cli-deploy-git-ci": "^1.0.1", "ember-cli-eslint": "^5.1.0", "ember-cli-inject-live-reload": "^2.0.1", + "ember-cli-sass": "^10.0.0", "ember-cli-shims": "^1.2.0", "ember-cli-sri": "^2.1.0", "ember-cli-terser": "^4.0.0",