Skip to content

Commit 45eaf2a

Browse files
committed
DOC-3147: Refactor split button documentation and CSS classes for clarity and consistency
1 parent 75d5537 commit 45eaf2a

File tree

4 files changed

+42
-17
lines changed

4 files changed

+42
-17
lines changed

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
107107
=== Split buttons are now rendered as separate action and chevron buttons.
108108
// #TINY-8665
109109

110-
Split buttons in {productname} {release-version} now render as two independent, focusable components instead of a single composite element. The main button performs the primary action, while the chevron button controls the dropdown menu. This design improvement enhances accessibility by allowing separate focus targets and ARIA labels for each button. Additionally, the `+setTooltip+` method has been updated to apply tooltip content to both the main and chevron buttons simultaneously, ensuring consistent guidance for users.
110+
Split buttons in {productname} {release-version} now render as two independent, focusable components instead of a single composite element. The main button performs the primary action, while the chevron button controls the dropdown menu. This design improvement enhances accessibility by allowing separate focus targets and ARIA labels for each button.
111111

112112

113113
[[additions]]
@@ -123,7 +123,7 @@ Split buttons in {productname} {release-version} now render as two independent,
123123
=== Split button tooltip configuration
124124
// #TINY-8665
125125

126-
The `+chevronTooltip+` property provides custom tooltip text for the chevron button portion of split buttons. When `+chevronTooltip+` is not specified, {productname} automatically generates tooltip text using the pattern `+"{tooltip} menu"+`. The enhanced `+setTooltip+` method updates both main and chevron tooltips to maintain consistency.
126+
The `+chevronTooltip+` property provides custom tooltip text for the chevron button portion of split buttons. When `+chevronTooltip+` is not specified, {productname} automatically generates tooltip text using the pattern `+"{tooltip} menu"+`. The `+setTooltip+` method updates both main and chevron tooltips to maintain consistency.
127127

128128
For more information, see xref:custom-split-toolbar-button.adoc[Split toolbar buttons].
129129

@@ -141,7 +141,7 @@ For more information, see xref:custom-split-toolbar-button.adoc[Split toolbar bu
141141
=== Split button DOM structure changes
142142
// #TINY-8665
143143

144-
The internal DOM structure of split buttons has been updated to align with the new component-based architecture. Split button components now use the `+.tox-split-button__main+` and `+.tox-split-button__chevron+` CSS classes in place of the previous composite layout. Each part of the split button is rendered as an independent DOM element with separate event handling and focus management. Custom CSS that targets split button internals may need to be updated to reflect these changes.
144+
The split buttons are now rendered as two separate buttons: action and dropdown. Each has its own event handling and focus management. Split button components now use `+.tox-split-button__main+` and `+.tox-split-button__chevron+` CSS classes. Custom CSS that targets split button internals may need to be updated to reflect these changes.
145145

146146

147147
[[removed]]

modules/ROOT/pages/creating-a-skin.adoc

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,29 @@ _Do not edit these files directly_. Instead, use them as references when creatin
6868
6969
The typical workflow involves copying variables from the theme folder into the skins `skin.less` file and modifying them as needed.
7070
71-
NOTE: As of {productname} 8.0, split buttons use `.tox-split-button__main` and `.tox-split-button__chevron` CSS classes. If your skin targets split button components, you may need to update your CSS selectors.
71+
NOTE: Split buttons use `.tox-split-button__main` and `.tox-split-button__chevron` CSS classes. If your skin targets split button components, you may need to update your CSS selectors.
72+
73+
.Example: Updating split button CSS selectors
74+
[source,css]
75+
----
76+
/* Before: targeting the composite split button */
77+
.tox-split-button {
78+
/* Previous styling approach */
79+
}
80+
81+
/* After: targeting individual components */
82+
.tox-split-button__main {
83+
/* Main button styling */
84+
background-color: #blue;
85+
border-radius: 4px 0 0 4px;
86+
}
87+
88+
.tox-split-button__chevron {
89+
/* Chevron button styling */
90+
background-color: #darkblue;
91+
border-radius: 0 4px 4px 0;
92+
}
93+
----
7294
====
7395

7496
[NOTE]

modules/ROOT/pages/custom-split-toolbar-button.adoc

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,6 @@ include::partial$components/choice-menu-items.adoc[]
5757

5858
== CSS Classes
5959

60-
As of {productname} 8.0, split buttons render as two separate components:
61-
62-
* `.tox-split-button__main` - Main action button
63-
* `.tox-split-button__chevron` - Dropdown chevron button
64-
65-
If you have custom CSS targeting split button internals, you may need to update your selectors.
66-
67-
[source,css]
68-
----
69-
/* TinyMCE 8.0+ */
70-
.tox-split-button__main
71-
.tox-split-button__chevron
72-
----
60+
include::partial$components/split-button-css-classes.adoc[]
7361

7462
include::partial$misc/onSetup.adoc[]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Split buttons render as two separate components, each with their own CSS classes for targeted styling:
2+
3+
* `.tox-split-button__main` - Main action button
4+
* `.tox-split-button__chevron` - Dropdown chevron button
5+
6+
[source,css]
7+
----
8+
.tox-split-button__main {
9+
/* Main button styling */
10+
}
11+
12+
.tox-split-button__chevron {
13+
/* Chevron button styling */
14+
}
15+
----

0 commit comments

Comments
 (0)