Skip to content
Merged
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions gravity-forms/gw-style-numbers-like-total.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Gravity Wiz // Gravity Forms // Style Number Fields like Total Field
*
* Use "gf_price" and "gf_total" CSS classes via the "CSS Class Name" setting to style your Number fields like a product
* price (red) or total (green).
Comment on lines +4 to +5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Documentation-code mismatch: comment references red price styling but code uses green.

The comment on lines 4-5 states that the gf_price class styles number fields like a "product price (red)", but the actual CSS color applied to both gf_price and gf_total is #060 (dark green). Clarify whether both classes should use the same green color or if gf_price should use a different color (e.g., red).

Apply one of these fixes:

Option 1: Update the comment to reflect the actual behavior (both green)

- * Use "gf_price" and "gf_total" CSS classes via the "CSS Class Name" setting to style your Number fields like a product
- * price (red) or total (green).
+ * Use "gf_price" and "gf_total" CSS classes via the "CSS Class Name" setting to style your Number fields like a product
+ * price or total (both styled in green).

Option 2: Update the CSS to differentiate price styling (red) from total styling (green)

  .gform_wrapper .gf_price input[type=text],
  .gform_wrapper .gf_price input[type=number] {
  	border: 0;
  	font-size: 1.2em;
-	color: #060;
+	color: #c00;
  	text-indent: 0;
  	padding: 0;
  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Use "gf_price" and "gf_total" CSS classes via the "CSS Class Name" setting to style your Number fields like a product
* price (red) or total (green).
* Use "gf_price" and "gf_total" CSS classes via the "CSS Class Name" setting to style your Number fields like a product
* price or total (both styled in green).
🤖 Prompt for AI Agents
In gravity-forms/gw-style-numbers-like-total.css around lines 4 to 5, the
comment claims gf_price styles numbers as "product price (red)" but the CSS
applies the same dark green (#060) to both gf_price and gf_total; either update
the comment to say both classes use green or change the CSS so gf_price uses a
red color (e.g., #c00) and gf_total remains green — pick one option and make the
corresponding change: for Option 1, edit the comment text to say both use green
(#060); for Option 2, change the gf_price color rule to a red value and keep
gf_total as green, and ensure the comment reflects that gf_price is red and
gf_total is green.

*/
.gform_wrapper .gf_price input[type=text],
.gform_wrapper .gf_price input[type=number] {
border: 0;
font-size: 1.2em;
color: #060;
text-indent: 0;
padding: 0;
}
.gform_wrapper .gf_total input[type=text],
.gform_wrapper .gf_total input[type=number] {
color: #060;
}