Bug Tracker

Modify

Ticket #9842 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 22 months ago

.css(property, null) should work like .css(property, '')

Reported by: borislav.asdf@… Owned by: rwaldron
Priority: low Milestone: 1.next
Component: css Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

IMO it is not great coding practice to use empty string for something which the language has built in sort of "empty value" - null. The .css() function can set string and integer values so using empty string to remove the value in both cases is a little dirty. Using null-s is cleaner IMO.

Change History

comment:1 Changed 3 years ago by rwaldron

  • Owner set to rwaldron
  • Priority changed from undecided to low
  • Status changed from new to assigned
  • Component changed from unfiled to css
  • Milestone changed from 1.next to 1.7

comment:2 Changed 3 years ago by rwaldron

  • Milestone changed from 1.7 to 1.next

No discussion was had in a reasonable amount of time for this ticket.

comment:3 Changed 22 months ago by dmethvin

  • Status changed from assigned to closed
  • Resolution set to wontfix

I don't see a need for this, it just adds more special cases when the caller can say what they mean. In most cases you're better off using classes anyway.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.