Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 31dce1b

Browse files
authored
Merge pull request #4573 from magento/small_changes
Small changes
2 parents 9032da8 + b35fa83 commit 31dce1b

File tree

7 files changed

+48
-22
lines changed

7 files changed

+48
-22
lines changed

guides/v2.1/frontend-dev-guide/css-topics/css_debug.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ grunt watch | Tracks the changes in the source files, recompiles `.css` files, a
8484
8585
The following shows which Grunt tasks to use for debugging:
8686
87-
- After you switch the compilation mode from client-side to server-side, run the `exec` command.
88-
- After you customize the content of any `.less` file, except the root source files, run the `less` task and reload the page.
89-
- After you [customize the root source files or move the files included to the root files]({{ page.baseurl }}/frontend-dev-guide/css-topics/css-preprocess.html), run the `exec` command and reload the page.
90-
- After you run the `exec` command, run the `clear` command to `clear` the Magento cache, then run the `watch` command. Running the commands in this order will ensure that any custom jQuery attributes like product sliders, banners, etc are loaded correctly.
87+
- After you switch the compilation mode from client-side to server-side, run the `exec` command.
88+
- After you customize the content of any `.less` file, except the root source files, run the `less` task and reload the page.
89+
- After you [customize the root source files or move the files included to the root files]({{ page.baseurl }}/frontend-dev-guide/css-topics/css-preprocess.html), run the `exec` command and reload the page.
90+
- After you run the `bin/magento setup:upgrade` command, run the `exec` command.
91+
- After you run the `exec` command, run the `clear` command to `clear` the Magento cache, then run the `watch` command. Running the commands in this order will ensure that any custom jQuery attributes like product sliders, banners, etc are loaded correctly.
9192
9293
If you have LiveReload installed, run the `grunt watch` command, and the flow is even simpler:
93-
- After you customize the content of any `.less` file, changes are applied and the page reloads automatically. No additional changes are required.
94-
- After you [customize the root source files or move the files included to the root files]({{ page.baseurl }}/frontend-dev-guide/css-topics/css-preprocess.html), run the `clean` and `exec` commands, and the browser page reloads automatically.
94+
- After you customize the content of any `.less` file, changes are applied and the page reloads automatically. No additional changes are required.
95+
- After you [customize the root source files or move the files included to the root files]({{ page.baseurl }}/frontend-dev-guide/css-topics/css-preprocess.html), run the `clean` and `exec` commands, and the browser page reloads automatically.
9596
9697
9798
## CSS source maps {#source_maps}
@@ -112,7 +113,6 @@ The path to the CSS source maps configuration differs, depending on the browser.
112113
113114
In Google Chrome, to enable source maps generation, go to **Inspect** > **Settings** > **Preferences** > **Enable CSS source maps**.
114115
115-
116116
Magento has a base set of variables that define commonly used aspects of a theme; such as colors, fonts, style of page titles, and so on.
117117
118118
The `<magento-root>/lib/web/css/source/lib/variables` directory contains LESS files that define values assigned to variables for many of the common elements in Magento.
@@ -121,7 +121,7 @@ To change or override any of these variables, simply create a file in `<theme-di
121121
122122
![node declaration autocomplete]({{ site.baseurl }}/common/images/fdg/lib-map.png){:width="610px"}
123123
124-
```
124+
```css
125125
@navigation__background: @secondary__color__light;
126126
@font-family__sans-serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;
127127
```

guides/v2.1/frontend-dev-guide/css-topics/theme-ui-lib.md

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ The Magento UI library provides the ability to customize and reuse the following
3434

3535
The following illustration shows a {% glossarytooltip 1a70d3ac-6bd9-475a-8937-5f80ca785c14 %}storefront{% endglossarytooltip %} product page containing some of the preceding elements:
3636

37-
![A product page with user interface elements specified][ui_lib1.png]
37+
![*A product page with user interface elements specified*][ui_lib1.png]
3838

3939
## Mixin location {#fedg_using-ui-lib_mixins}
4040

41-
You can find the Magento UI library under [`lib/web/css`].
41+
You can find the Magento UI library under [`lib/web/css`][].
4242
Library source `.less` files are stored under the `source` directory, each file contains mixins for configuring a certain element, and in most cases the element coincides with the file name:
43+
4344
```tree
4445
lib/web
4546
├── css/
@@ -85,12 +86,12 @@ lib/web
8586

8687
## Predefined variables {#fedg_using-ui-lib_predef-vars}
8788

88-
If your theme [inherits] from any Magento out-of-the-box theme, for example Blank, you can easily customize any element of a store page without changing any {% glossarytooltip 6c5cb4e9-9197-46f2-ba79-6147d9bfe66d %}CSS{% endglossarytooltip %} code or templates.
89+
If your theme [inherits][] from any Magento out-of-the-box theme, for example Blank, you can easily customize any element of a store page without changing any {% glossarytooltip 6c5cb4e9-9197-46f2-ba79-6147d9bfe66d %}CSS{% endglossarytooltip %} code or templates.
8990
Customization can be performed by simply changing in your theme the values of the predefined variables used in the UI library or parent theme mixins.
9091

91-
The complete list of these variables and their default values are stored in [`lib/web/css/source/lib/variables`].
92+
The complete list of these variables and their default values are stored in [`lib/web/css/source/lib/variables`][].
9293
This directory contains a set of files, corresponding to the set of UI library elements, and each of the files lists element-specific variables.
93-
For example, [`lib/web/css/source/lib/variables/_breadcrumbs.less`] contains variables used in the `breadcrumbs()` {% glossarytooltip 1a305bdb-9be8-44aa-adad-98758821d6a7 %}mixin{% endglossarytooltip %}.
94+
For example, [`lib/web/css/source/lib/variables/_breadcrumbs.less`][] contains variables used in the `breadcrumbs()` {% glossarytooltip 1a305bdb-9be8-44aa-adad-98758821d6a7 %}mixin{% endglossarytooltip %}.
9495

9596
To change the default library variables values, specify the new values for the required variables in the `<theme_dir>/web/css/source/_theme.less` file.
9697

@@ -101,7 +102,7 @@ So if you want to inherit the parent theme's variable values additionally to you
101102
The following figure shows the product page shown earlier in this topic, after a custom theme was applied.
102103
The theme customized Blank by redefining variables only.
103104

104-
![Changing design by redefining variables][ui_lib2.png]
105+
![*Changing design by redefining variables*][ui_lib2.png]
105106

106107
## Your custom variables {#fedg_using-ui-lib_vars}
107108

@@ -114,12 +115,15 @@ The following paragraphs describe both ways to call a mixin.
114115

115116
To use a mixin with default values, call the mixin without specifying any parameters.
116117
For example:
118+
117119
```css
118120
.breadcrumbs {
119121
.lib-breadcrumbs();
120122
}
121123
```
124+
122125
To call a mixin with parameter values different from default, set these values when calling the mixin, like in the following example:
126+
123127
```css
124128
.example-button {
125129
.lib-button(
@@ -137,7 +141,8 @@ Variables starting with `@` (without the underscore) are global, and are listed
137141
Use the accordion style for mobile and tab style for desktop.
138142

139143
To set tabs and accordions using breakpoints, see the following example:
140-
```text
144+
145+
```css
141146
& when (@media-common = true) {
142147
.product.data.items {
143148
.lib-data-accordion();
@@ -150,6 +155,21 @@ To set tabs and accordions using breakpoints, see the following example:
150155
}
151156
}
152157
```
158+
## Navigation set with CSS
159+
160+
Use the Navigation style for mobile and tab style for desktop.
161+
162+
To set navigation using breakpoints, see the following example:
163+
164+
```css
165+
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
166+
.lib-main-navigation();
167+
}
168+
169+
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
170+
.lib-main-navigation-desktop();
171+
}
172+
```
153173

154174
## Embedded documentation {#docs}
155175

guides/v2.1/frontend-dev-guide/responsive-web-design/rwd_css.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ The Blank and Luma theme styles are based on the [Magento UI library]. The libra
4444

4545
The approach implemented in the Magento UI library, uses `@media-common` style group separation and `.media-width()` mixins which can be used in any `.less` file in a theme, as many times as needed, but it is invoked only once, in `lib/web/css/source/lib/_responsive.less`. The resulting `styles-m.css` and `styles-l.css` both have only one call of each media query with all the rules there, instead of multiple calls for the same query.
4646

47+
- Media queries `@media-common`, `max screen__s` and `max screen__m` will be added to `styles-m.css`.
48+
- Media queries `min screen__m` and `min screen__l` will be added to `styles-l.css`.
49+
4750
If working on a theme which inherits from either the Blank or Luma theme, it's recommended to use `.media-width()` and style groups separation. Otherwise the style rules will be added twice, once to `styles-m.css` and once more to `styles-l.css`.
4851

4952
For Less styles rules to be compiled to `styles-m.css` without a media query so that they apply to all screen widths use the `@media-common` style group separation.

guides/v2.1/frontend-dev-guide/themes/debug-theme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ There is no straightforward algorithm how to define at once the exact layout fil
6464

6565
Example:
6666

67-
Let's say you need to locate the layout that is responsible for displaying mini shopping cart on the storefront, when the Blank theme by Magento is applied for the {% glossarytooltip ca5a9ff1-8182-4fc4-a34b-9b3f831dbf3f %}store view{% endglossarytooltip %}.
67+
Say you need to locate the layout that is responsible for displaying mini shopping cart on the storefront, when the Blank theme by Magento is applied for the {% glossarytooltip ca5a9ff1-8182-4fc4-a34b-9b3f831dbf3f %}store view{% endglossarytooltip %}.
6868

6969
Using the Template Hints we determine that the template is `app/code/Magento/Checkout/view/frontend/templates/cart/minicart.phtml`, and in the path, we see that it belongs to the `Magento_Checkout` module.
7070

71-
Let's search for the layout following the fallback scheme:
71+
Search for the layout following the fallback scheme:
7272

7373
1. Check the `app/design/frontend/Magento/blank/Magento_Checkout/` layout. To locate the required layout, search this directory for occurrences of the template name, " minicart.phtml ". No matching file is found, so we proceed to the next fallback level, which is the parent theme layouts.
7474
2. We can find the info about parent theme in a theme configuration file `theme.xml`, the parent theme name is specified there in the `<parent></parent>` node. In the `app/design/frontend/Magento/blank/theme.xml` there's no `<parent>` node, which means the Blank theme has no parents. So we should search on the next fallback level which is the module layouts.
@@ -78,8 +78,8 @@ After you located the necessary layout file, you can create your custom layout f
7878

7979
## Locate styles {#debug-theme-style}
8080

81-
To locate a CSS rule that is applied to a certain element, find the template for the page that contains the element. Or you can use browser debugging tools, to locate the class name.
82-
After you find the class name, use text search in the theme and module styles directories to locate the `.less` or `.css` file that defines the class. Perform the search according to the following fallback scheme:
81+
To locate a CSS rule that is applied to a certain element, find the template for the page that contains the element. Or use browser debugging tools to locate the class name.
82+
After you find the class name, use text search in the theme and module styles directories to locate the `.less` or `.css` file that defines the class. Using the grunt tool makes it easy to locate the CSS path to the specific line number. Perform the search according to the following fallback scheme:
8383

8484

8585
2. Theme styles `<current_theme_dir>/web/css/`

guides/v2.2/frontend-dev-guide/css-topics/css_debug.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ The following shows which Grunt tasks to use for debugging:
7474
- After you switch the compilation mode from client-side to server-side, run the `exec` command.
7575
- After you customize the content of any `.less` file, except the root source files, run the `less` task and reload the page.
7676
- After you [customize the root source files or move the files included to the root files]({{ page.baseurl }}/frontend-dev-guide/css-topics/css-preprocess.html#css_exception), run the `exec` command and reload the page.
77+
- After you run `php bin/magento setup:upgrade`, run `exec` command.
7778
- After you run the `exec` command, run the `clear` command to `clear` the Magento cache, then run the `watch` command. Running the commands in this order will ensure that any custom jQuery attributes like product sliders, banners, etc are loaded correctly.
7879
7980
If you have LiveReload installed, run the `grunt watch` command, and the flow is even simpler:

guides/v2.2/frontend-dev-guide/layouts/layout-overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This article describes the basic concepts you need to know to create layouts for
1212

1313
In Magento, the basic components of page design are layouts, containers, and blocks. A *layout* represents the structure of a web page (1). *Containers* represent the placeholders within that web page structure (2). And *blocks* represent the UI controls or components within the container placeholders (3). These terms are illustrated and defined below.
1414

15+
The objective is to create a structured, common set of layout instructions to render pages. Most pages on a website can be categorized as a 1 column, 2 column, or 3 column layout. These page layouts can applied to a page from within the admin panel.
16+
1517
![web page sample layout][layout]
1618

1719
(1) *Layouts* provide the structures for web pages using an XML file that identifies all the containers and blocks composing the page. The details of layout XML files are described later in this section.

guides/v2.3/config-guide/elasticsearch/es-downgrade.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ Running ES 2.x is strongly discouraged.
2121
If you need to work with Elasticsearch 5.x, run the following command:
2222

2323
```bash
24-
composer require "elastic/elasticsearch:~5.1"
24+
composer require "elasticsearch/elasticsearch:~5.1"
2525
```
2626

2727
If you need to work with Elasticsearch 2.x, run the following command:
2828

2929
```bash
30-
composer require "elastic/elasticsearch:~2.0"
30+
composer require "elasticsearch/elasticsearch:~2.0"
3131
```
3232

3333
To re-enable Elasticsearch 6.x, run the following command:
3434

3535
```bash
36-
composer require "elastic/elasticsearch:~6.1"
36+
composer require "elasticsearch/elasticsearch:~6.1"
3737
```
3838

3939
Then configure Elasticsearch within [Magento Admin][].

0 commit comments

Comments
 (0)