Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/app/components/snippets/styles-0.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:root,
:host {
--ember-basic-dropdown-content-background-color: #fff;
--ember-basic-dropdown-content-z-index: 1000;
--ember-basic-dropdown-overlay-background: rgb(0 0 0 / 50%);
--ember-basic-dropdown-overlay-pointer-events: none;
}
14 changes: 4 additions & 10 deletions docs/app/templates/public-pages/docs/styles.gts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@ import CodeExample from '../../../components/code-example';

<p>
Since this component doesn't any visual theme, you can apply styles to it
just with plain CSS or even adding the classes your favourite CSS framework
gives you.
just with CSS variables, plain CSS or even adding the classes your favorite
CSS framework gives you.
</p>

<p>
If don't use any css pre-processor this is all. If you do use SASS, the
addon will know it and will have to
<code>@use</code>
the styles explicitly. This gives you the chance to set a few variables that
Ember Basic Dropdown will use.
</p>
<CodeExample @css="styles-0.css" @showResult={{false}} @activeTab="css" />

<p>
There is only four variables you can tweak (Sass syntax)
If you use SASS you can override the default values by using the SASS syntax
</p>

<CodeExample @scss="styles-1.scss" @showResult={{false}} @activeTab="scss" />
Expand Down
20 changes: 20 additions & 0 deletions ember-basic-dropdown-for-css-generate.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@use "scss/variables.scss" with (
$ember-basic-dropdown-content-background-color: var(
--ember-basic-dropdown-content-background-color,
#fff
),
$ember-basic-dropdown-content-z-index: var(
--ember-basic-dropdown-content-z-index,
1000
),
$ember-basic-dropdown-overlay-background: var(
--ember-basic-dropdown-overlay-background,
rgba(0, 0, 0, 0.5)
),
$ember-basic-dropdown-overlay-pointer-events: var(
--ember-basic-dropdown-overlay-pointer-events,
none
)
);

@use "scss/base.scss";
4 changes: 2 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const tsConfig = resolve(rootDirectory, './tsconfig.publish.json');

export default [
{
input: './_index.scss',
input: './ember-basic-dropdown-for-css-generate.scss',
output: {
file: './src/vendor/ember-basic-dropdown.js',
assetFileNames: '[name][extname]',
Expand All @@ -29,7 +29,7 @@ export default [
],
},
{
input: './_index.scss',
input: './ember-basic-dropdown-for-css-generate.scss',
output: {
file: './src/vendor/ember-basic-dropdown.js',
assetFileNames: '[name][extname]',
Expand Down