Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aec32e6
Initial commit. Adding further documentation, cleaning up changelog r…
ramonjd Sep 5, 2022
324c7fb
Typos, formatting
ramonjd Sep 5, 2022
66859c1
Typos, formatting
ramonjd Sep 5, 2022
fda9bd9
Sorting out change log and formatting
ramonjd Sep 5, 2022
aad9a7a
Remove enqueue option. It does nothing.
ramonjd Sep 5, 2022
627dda9
Update packages/style-engine/docs/using-the-style-engine-with-block-s…
ramonjd Sep 5, 2022
960e7a9
Update README.md
ramonjd Sep 5, 2022
29a9369
Updating manifest.json to include new style engine docs
ramonjd Sep 6, 2022
47ab494
Adding type annotation
ramonjd Sep 6, 2022
fb680d7
Updating CHANGELOG.md
ramonjd Sep 6, 2022
a0149a5
Updated version to prerelease
ramonjd Sep 6, 2022
2279755
Rebase after #43886
ramonjd Sep 6, 2022
d1939e4
Updating change logs and emphasizing that new global JS methods are a…
ramonjd Sep 7, 2022
1084864
Checking for functions and classes in tests so that Gutenberg tests d…
ramonjd Sep 7, 2022
2d9b645
Formatting PHP doc comments and params that describe associative arrays
ramonjd Sep 8, 2022
3d5e463
Formatting
ramonjd Sep 8, 2022
09843d4
Combining tests for get_declarations_string
ramonjd Sep 8, 2022
7cc64a2
Adding message parameter to assertions where more than one assertion …
ramonjd Sep 8, 2022
53e4edb
Updating PHP docs
ramonjd Sep 8, 2022
5af5d0a
Text domain added to __()
ramonjd Sep 8, 2022
7991cf1
Refactoring sanitization tests for CSS declarations
ramonjd Sep 8, 2022
469b90f
Formatting styleEngine tests
ramonjd Sep 8, 2022
edf81cb
My blod is typo
ramonjd Sep 8, 2022
6f7ef65
Active voice rather than imperative
ramonjd Sep 8, 2022
fb8edd7
Remove Gutenberg suffix
ramonjd Sep 8, 2022
9ac232c
Adding message to script loader block support enqueuing expectations
ramonjd Sep 9, 2022
ccf6773
Grammar, formatting, removing class_exists checks
ramonjd Sep 9, 2022
afc7d9e
Ignore unused variable. This is a common test pattern in Core.
ramonjd Sep 9, 2022
19b6885
Remove unusued var in tests
ramonjd Sep 9, 2022
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
Prev Previous commit
Next Next commit
Updated version to prerelease
Reverted JS comments for TS types and rebuilt docs
Removed style engine from bundle exception array
  • Loading branch information
ramonjd committed Sep 13, 2022
commit a0149a58bc12e5210017cab433a63c4bff16ea36
6 changes: 1 addition & 5 deletions packages/dependency-extraction-webpack-plugin/lib/util.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const WORDPRESS_NAMESPACE = '@wordpress/';
const BUNDLED_PACKAGES = [
'@wordpress/icons',
'@wordpress/interface',
'@wordpress/style-engine',
];
const BUNDLED_PACKAGES = [ '@wordpress/icons', '@wordpress/interface' ];

/**
* Default request to global transformation
Expand Down
2 changes: 1 addition & 1 deletion packages/style-engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ _Parameters_

_Returns_

- `GeneratedCSSRule[]`: GeneratedCSSRule\[] A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.
- `GeneratedCSSRule[]`: A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.

<!-- END TOKEN(Autogenerated API docs) -->

Expand Down
12 changes: 6 additions & 6 deletions packages/style-engine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import { styleDefinitions } from './styles';
/**
* Generates a stylesheet for a given style object and selector.
*
* @param {Style} style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
* @param {StyleOptions} options Options object with settings to adjust how the styles are generated.
* @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
* @param options Options object with settings to adjust how the styles are generated.
*
* @return {string} A generated stylesheet or inline style declarations.
* @return A generated stylesheet or inline style declarations.
*/
export function compileCSS( style: Style, options: StyleOptions = {} ): string {
const rules = getCSSRules( style, options );
Expand Down Expand Up @@ -56,10 +56,10 @@ export function compileCSS( style: Style, options: StyleOptions = {} ): string {
/**
* Returns a JSON representation of the generated CSS rules.
*
* @param {Style} style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
* @param {StyleOptions} options Options object with settings to adjust how the styles are generated.
* @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
* @param options Options object with settings to adjust how the styles are generated.
*
* @return GeneratedCSSRule[] A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.
* @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.
*/
export function getCSSRules(
style: Style,
Expand Down