Skip to content

Commit f579261

Browse files
committed
few tweaks
1 parent b5e87cf commit f579261

File tree

1 file changed

+5
-6
lines changed
  • files/en-us/web/css/css_colors/color_mixer

1 file changed

+5
-6
lines changed

files/en-us/web/css/css_colors/color_mixer/index.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ page-type: guide
55
sidebar: cssref
66
---
77

8-
This tool lets you mix two colors in any color space using the {{cssxref("color-mix")}} function and copy the resulting color in any CSS color format. The two input colors, `color-one` and `color-two`, are shown on the outside, and the mixed color returned by the function is shown in the middle. Click on the outer swatches to select new colors to mix. Use the sliders to change the percentages of each input color included in the mix. Use the drop-down menu to change the color space of the function's output. CSS color values for the resulting color are selectable below the color widget.
8+
This tool lets you mix two colors in any color space using the {{cssxref("color_value/color-mix")}} function and copy the resulting color in any CSS color format. The two input colors, `color-one` and `color-two`, are shown on the outside, and the mixed color returned by the function is shown in the middle. Click on the outer swatches to select new colors to mix. Use the sliders to change the percentages of each input color included in the mix. Use the drop-down menu to change the color space of the function's output. CSS color values for the resulting color are selectable below the color widget.
99

1010
```html hidden live-sample___color-mixer
1111
<div id="color-mixer">
@@ -333,9 +333,9 @@ dialog#picker-dialog table {
333333
#color-mixer > :nth-child(13) {
334334
grid-area: mix-output-text;
335335
margin: 1rem 0;
336+
padding: 1rem 0;
336337
text-align: center;
337-
height: 2.5rem;
338-
background-color: #ededed;
338+
background-color: #dfdfde;
339339
font-family: monospace;
340340
}
341341

@@ -688,9 +688,8 @@ function updateColorMix() {
688688

689689
mixedColorDiv.style.setProperty("background-color", colorMixFunction);
690690

691-
const mixedColorText = window.getComputedStyle(mixedColorDiv).backgroundColor;
692691
mixedOutputText.innerText = colorMixFunction;
693-
displayOutputColors(mixedColorText);
692+
displayOutputColors(window.getComputedStyle(mixedColorDiv).backgroundColor);
694693
}
695694

696695
function displayOutputColors(color) {
@@ -827,7 +826,7 @@ function init() {
827826
init();
828827
```
829828

830-
{{EmbedLiveSample("color-mixer", "", 750, "", "", "", "clipboard-write")}}
829+
{{EmbedLiveSample("color-mixer", "", 800, "", "", "", "clipboard-write")}}
831830

832831
## See also
833832

0 commit comments

Comments
 (0)