mirror of
https://github.com/Retropex/custom-ocean.xyz-dashboard.git
synced 2025-05-12 19:20:45 +02:00
Enhance negative profit styling with text shadow
Added a `text-shadow` property to the styling of `dailyProfitElement` and `monthlyProfitElement` to improve visibility when profit values are negative. Existing styles for color and font-weight remain unchanged.
This commit is contained in:
parent
6f5b2ec359
commit
c3de5544ef
@ -1225,7 +1225,7 @@ function updateUI() {
|
|||||||
dailyProfitElement.textContent = "$" + numberWithCommas(dailyProfitUSD.toFixed(2));
|
dailyProfitElement.textContent = "$" + numberWithCommas(dailyProfitUSD.toFixed(2));
|
||||||
if (dailyProfitUSD < 0) {
|
if (dailyProfitUSD < 0) {
|
||||||
// Use setAttribute to properly set the style with !important
|
// Use setAttribute to properly set the style with !important
|
||||||
dailyProfitElement.setAttribute("style", "color: #ff5555 !important; font-weight: bold !important;");
|
dailyProfitElement.setAttribute("style", "color: #ff5555 !important; font-weight: bold !important; text-shadow: 0 0 6px rgba(255, 85, 85, 0.6) !important;");
|
||||||
} else {
|
} else {
|
||||||
// Clear the style attribute completely instead of setting it to empty
|
// Clear the style attribute completely instead of setting it to empty
|
||||||
dailyProfitElement.removeAttribute("style");
|
dailyProfitElement.removeAttribute("style");
|
||||||
@ -1239,7 +1239,7 @@ function updateUI() {
|
|||||||
monthlyProfitElement.textContent = "$" + numberWithCommas(monthlyProfitUSD.toFixed(2));
|
monthlyProfitElement.textContent = "$" + numberWithCommas(monthlyProfitUSD.toFixed(2));
|
||||||
if (monthlyProfitUSD < 0) {
|
if (monthlyProfitUSD < 0) {
|
||||||
// Use setAttribute to properly set the style with !important
|
// Use setAttribute to properly set the style with !important
|
||||||
monthlyProfitElement.setAttribute("style", "color: #ff5555 !important; font-weight: bold !important;");
|
monthlyProfitElement.setAttribute("style", "color: #ff5555 !important; font-weight: bold !important; text-shadow: 0 0 6px rgba(255, 85, 85, 0.6) !important;");
|
||||||
} else {
|
} else {
|
||||||
// Clear the style attribute completely
|
// Clear the style attribute completely
|
||||||
monthlyProfitElement.removeAttribute("style");
|
monthlyProfitElement.removeAttribute("style");
|
||||||
|
Loading…
Reference in New Issue
Block a user