Compare commits

...

4 Commits

Author SHA1 Message Date
David Tsay
f9a5caa6bd adding files 2019-12-06 16:36:11 -08:00
David Tsay
b3e78e4202 WIP adding multiple entry points 2019-12-06 16:35:08 -08:00
David Tsay
bd1c2689f6 WIP lazy style tag approach 2019-12-02 11:41:03 -08:00
David Tsay
edcceda4d6 WIP styles available globally 2019-11-29 16:42:51 -08:00
52 changed files with 206 additions and 101 deletions

View File

@@ -37,6 +37,7 @@
const FIVE_MINUTES = 5 * 60 * 1000;
const THIRTY_MINUTES = 30 * 60 * 1000;
openmct.install(openmct.plugins.Themes());
[
'example/eventGenerator',
'example/styleguide'

View File

@@ -27,6 +27,7 @@
"exports-loader": "^0.7.0",
"express": "^4.13.1",
"fast-sass-loader": "1.4.6",
"fibers": "^4.0.2",
"file-loader": "^1.1.11",
"file-saver": "^1.3.8",
"git-rev-sync": "^1.4.0",
@@ -60,8 +61,10 @@
"printj": "^1.2.1",
"raw-loader": "^0.5.1",
"request": "^2.69.0",
"sass": "^1.23.7",
"sass-loader": "^8.0.0",
"split": "^1.0.0",
"style-loader": "^0.21.0",
"style-loader": "^1.0.1",
"v8-compile-cache": "^1.1.0",
"vue": "2.5.6",
"vue-loader": "^15.2.6",

View File

@@ -26,8 +26,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
@mixin legacyMessage() {
flex: 0 1 auto;
font-family: symbolsfont;

View File

@@ -26,8 +26,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
@mixin overlaySizing($marginTB: 5%, $marginLR: $marginTB, $width: auto, $height: auto) {
position: absolute;
top: $marginTB; right: $marginLR; bottom: $marginTB; left: $marginLR;

View File

@@ -32,8 +32,6 @@
</template>
<style lang="scss">
@import '~styles/sass-base';
.c-box-view {
display: flex;
align-items: stretch;

View File

@@ -60,8 +60,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
@mixin displayMarquee($c) {
> .c-frame-edit {
// All other frames

View File

@@ -35,8 +35,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-frame-edit {
// In Layouts, this is the editing rect and handles
display: none; // Set to display: block in DisplayLayout.vue

View File

@@ -32,7 +32,6 @@
</template>
<style lang="scss">
@import '~styles/sass-base';
.c-image-view {
background-size: cover;

View File

@@ -37,8 +37,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************* FRAME */
.c-frame {
display: flex;

View File

@@ -45,7 +45,6 @@
</template>
<style lang="scss">
@import '~styles/sass-base';
.c-telemetry-view {
display: flex;

View File

@@ -33,7 +33,6 @@
</template>
<style lang="scss">
@import '~styles/sass-base';
.c-text-view {
display: flex;

View File

@@ -20,8 +20,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-inspector {
.c-filter-indication {
border-radius: $smallCr;

View File

@@ -26,9 +26,7 @@
</li>
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-filter-indication {
<style lang="scss"> .c-filter-indication {
// Appears as a block element beneath tables
@include userSelectNone();
background: $colorFilterBg;

View File

@@ -85,7 +85,6 @@
</template>
<style lang="scss">
@import '~styles/sass-base';
@mixin containerGrippy($headerSize, $dir) {
position: absolute;

View File

@@ -23,8 +23,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************* GRID ITEMS */
.c-grid-item {
// Mobile-first

View File

@@ -9,8 +9,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************* GRID VIEW */
.l-grid-view {
display: flex;

View File

@@ -15,8 +15,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************* LIST ITEM */
.c-list-item {
&__name a {

View File

@@ -53,8 +53,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************* LIST VIEW */
.c-list-view {
overflow-x: auto !important;

View File

@@ -22,6 +22,7 @@
define([
'lodash',
'./themes/plugin',
'./utcTimeSystem/plugin',
'./localTimeSystem/plugin',
'../../example/generator/plugin',
@@ -47,6 +48,7 @@ define([
'./clearData/plugin'
], function (
_,
ThemesPlugin,
UTCTimeSystem,
LocalTimeSystem,
GeneratorPlugin,
@@ -85,6 +87,7 @@ define([
};
});
plugins.Themes = ThemesPlugin.default;
plugins.UTCTimeSystem = UTCTimeSystem;
plugins.LocalTimeSystem = LocalTimeSystem;

View File

@@ -42,8 +42,6 @@
</template>
<style lang="scss">
@import '~styles/sass-base.scss';
.c-tabs-view {
$h: 20px;
@include abs();

View File

@@ -11,9 +11,7 @@
</div>
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-filter-indication {
<style lang="scss"> .c-filter-indication {
@include userSelectNone();
background: $colorFilterBg;
color: $colorFilterFg;

View File

@@ -152,8 +152,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-telemetry-table__drop-target {
position: absolute;
width: 2px;

View File

@@ -0,0 +1,35 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2019, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
import core from '../../styles/core.scss';
import styles from '../../styles/theme-espresso.scss';
export default function ThemesPlugin(options) {
return function (openmct) {
console.log(styles)
core.use();
styles.use();
// setTimeout(() => {
// styles.unuse();
// }, 3000)
ThemesPlugin._installed = true;
};
}

View File

@@ -104,8 +104,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-input--submit {
// Can't use display: none because some browsers will pretend the input doesn't exist, and enter won't work
visibility: none;

View File

@@ -27,8 +27,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-conductor-axis {
$h: 18px;
$tickYPos: ($h / 2) + 12px;

View File

@@ -50,8 +50,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-conductor__mode-menu {
max-height: 80vh;
max-width: 500px;

View File

@@ -27,8 +27,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
@keyframes clock-hands {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }

View File

@@ -58,8 +58,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************************************** PICKER */
.c-datetime-picker {
@include userSelectNone();

View File

@@ -0,0 +1,46 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
@import "vendor/normalize-min";
// Imports only constants, mixins, etc.
// Meant for use as a single line import in Vue SFC's.
// Do not include anything that renders to CSS!
@import "constants";
@import "constants-mobile.scss";
@import "constants-espresso";
@import "mixins";
@import "animations";
/******************** RENDERS CSS */
@import "about";
@import "glyphs";
@import "global";
@import "status";
@import "controls";
@import "forms";
@import "table";
@import "legacy";
@import "legacy-plots";
@import "plotly";
@import "legacy-messages";

46
src/styles/core-snow.scss Normal file
View File

@@ -0,0 +1,46 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
@import "vendor/normalize-min";
// Imports only constants, mixins, etc.
// Meant for use as a single line import in Vue SFC's.
// Do not include anything that renders to CSS!
@import "constants";
@import "constants-mobile.scss";
@import "constants-snow";
@import "mixins";
@import "animations";
/******************** RENDERS CSS */
@import "about";
@import "glyphs";
@import "global";
@import "status";
@import "controls";
@import "forms";
@import "table";
@import "legacy";
@import "legacy-plots";
@import "plotly";
@import "legacy-messages";

View File

@@ -21,17 +21,17 @@
*****************************************************************************/
@import "vendor/normalize-min";
@import "sass-base";
// @import "sass-base";
/******************** RENDERS CSS */
@import "about";
@import "glyphs";
@import "global";
@import "status";
@import "controls";
@import "forms";
@import "table";
@import "legacy";
@import "legacy-plots";
@import "plotly";
@import "legacy-messages";
// @import "about";
// @import "glyphs";
// @import "global";
// @import "status";
// @import "controls";
// @import "forms";
// @import "table";
// @import "legacy";
// @import "legacy-plots";
// @import "plotly";
// @import "legacy-messages";

View File

@@ -26,7 +26,7 @@
@import "constants";
@import "constants-mobile.scss";
//@import "constants-espresso"; // TEMP
@import "constants-snow"; // TEMP
// @import "constants-snow"; // TEMP
//@import "constants-maelstrom";
@import "mixins";
@import "animations";
// @import "mixins";
// @import "animations";

3
src/styles/test-a.scss Normal file
View File

@@ -0,0 +1,3 @@
body {
background: purple !important;
}

View File

@@ -0,0 +1,43 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
// Imports only constants, mixins, etc.
// Meant for use as a single line import in Vue SFC's.
// Do not include anything that renders to CSS!
// @import "constants";
// @import "constants-mobile.scss";
@import "constants-espresso"; // TEMP
// @import "constants-snow"; // TEMP
//@import "constants-maelstrom";
@import "mixins";
@import "animations";
@import "about";
@import "glyphs";
@import "global";
@import "status";
@import "controls";
@import "forms";
@import "table";
@import "legacy";
@import "legacy-plots";
@import "plotly";
@import "legacy-messages";

View File

@@ -51,8 +51,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-so-view {
display: flex;
flex-direction: column;

View File

@@ -10,9 +10,7 @@
</a>
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-object-label {
<style lang="scss"> .c-object-label {
// <a> tag and draggable element that holds type icon and name.
// Used mostly in trees and lists
border-radius: $controlCr;

View File

@@ -15,8 +15,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************************************** PROGRESS BAR */
@keyframes progress {
100% { background-position: $progressAnimW center; }

View File

@@ -9,8 +9,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-toggle-switch {
$d: 12px;
$m: 2px;

View File

@@ -13,8 +13,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-search {
@include wrappedInput();

View File

@@ -28,8 +28,6 @@
</div>
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-elements-pool {
display: flex;
flex-direction: column;

View File

@@ -15,8 +15,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-inspector {
> [class*="__"] {
min-height: 50px;

View File

@@ -20,8 +20,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-location {
display: flex;
flex-wrap: wrap;

View File

@@ -247,8 +247,6 @@ const PLACEHOLDER_OBJECT = {};
</script>
<style lang="scss">
@import "~styles/sass-base";
.l-browse-bar {
display: flex;
align-items: center;

View File

@@ -28,8 +28,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-create-button,
.c-create-menu {
font-size: 1.1em;

View File

@@ -58,8 +58,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/******************************* SHELL */
.l-shell {
position: absolute;

View File

@@ -42,8 +42,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-tree-and-search {
display: flex;
flex-direction: column;

View File

@@ -27,8 +27,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
/**************************** BASE - MOBILE AND DESKTOP */
.l-multipane {
display: flex;

View File

@@ -20,8 +20,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-indicator {
@include cControl();
@include cClickIconButtonLayout();

View File

@@ -37,8 +37,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
@mixin statusBannerColors($bg, $fg: $colorStatusFg) {
$bgPb: 10%;
$bgPbD: 10%;

View File

@@ -52,7 +52,6 @@
</div>
</template>
<style lang="scss">
@import '~styles/sass-base';
.l-preview-window {
display: flex;

View File

@@ -17,8 +17,6 @@
</template>
<style lang="scss">
@import "~styles/sass-base";
.c-custom-checkbox {
$d: 14px;
display: flex;

View File

@@ -20,6 +20,8 @@ const webpackConfig = {
mode: devMode ? 'development' : 'production',
entry: {
openmct: './openmct.js',
espresso: './src/styles/core-espresso.scss',
snow: './src/styles/core-snow.scss'
},
output: {
filename: '[name].js',
@@ -71,14 +73,14 @@ const webpackConfig = {
{
test: /\.(sc|sa|c)ss$/,
use: [
devMode ? 'style-loader': MiniCssExtractPlugin.loader,
'css-loader',
{
loader: 'fast-sass-loader',
loader: devMode ? 'style-loader': MiniCssExtractPlugin.loader,
options: {
includePaths: bourbon.includePaths
injectType: 'lazyStyleTag' // change to lazyStyleTag and use styles in themes plugin
}
}
},
{loader: 'css-loader'},
{loader: 'sass-loader'}
]
},
{