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

Port themes over to widgets #932

Merged
merged 11 commits into from
Nov 28, 2019
Merged

Port themes over to widgets #932

merged 11 commits into from
Nov 28, 2019

Conversation

agubler
Copy link
Member

@agubler agubler commented Nov 27, 2019

Type: feature

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit tests are included in the PR
  • Any widget variant uses theme.compose like this
  • WidgetProperties are exported

Description:

  • Moves the existing default theme into theme/default directory
  • Changes references to the default theme to the new path
  • Include dojo and material theme from @dojo/themes
  • Use latest @dojo/cli-build-theme alpha
  • Scripts to build default, dojo and material themes
  • Packages themes in the correct location for distribution
  • Adds prefixes for appearance in CSS, as the build for examples runs in speed mode which disabled postcss.
  • Add css extension to prettier config
  • Run prettier on css

Todo:

  • Raise issues for supporting autoprefixing in speed mode on cli-build-app and an issue to remove the additional prefixes added as part of this PR

Resolves #931

@dojo-site
Copy link

This pull request has been deployed to:

@@ -18,6 +17,8 @@
/* Make native input invisible */
.nativeInput {
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not have auto-prefixing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't at the moment for the examples application because it runs in the "speed" mode that disables postcss. This is mostly temporary until we add auto prefixing as part of build-app under speed mode. I will raise an issue on both repos to ensure that it is followed.

@dojo-site
Copy link

This pull request has been deployed to:

@dojo-site
Copy link

This pull request has been deployed to:

@@ -1,5 +1,4 @@
import dojoTheme from '@dojo/themes/dojo';
import '@dojo/themes/dojo/index.css';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the CSS will be loaded via @dojo/widgets/theme/dojo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup themes will be loaded from importing the index of the theme, no longer needs to import the built index.css

@import './variables.css';

.root {
box-shadow: var(--box-shadow-dimensions-small) var(--color-box-shadow);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, this file will need to be modified with the changes of dojo/themes#105 to ensure that the base component styles are included.

@dojo-site
Copy link

This pull request has been deployed to:

@dojo-site
Copy link

This pull request has been deployed to:

@agubler agubler merged commit 4bbd847 into dojo:master Nov 28, 2019
ericos pushed a commit to ericos/widgets that referenced this pull request Jan 3, 2020
* move themes into default

* remove theme dep

* move dojo and material theme over

* use dojo theme from widgets

* use variables and base local to the theme

* add prefixes for appearance

* Add build theme to widgets

* Run prettier on css

* Update build theme tgz

* Update build theme tgz

* Use alpha cli-build-theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port themes from @dojo/themes back into @dojo/widgets
4 participants