Skip to content

Added "data-" to fields, so page maintains HTML5 compatibility #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MobilityTiago
Copy link

Added "data-" to custom attribute fields, so page maintains HTML5 compatibility (some code generating platforms will not allow invalid fields, so this mitigates that problem).
Also reduced decimal separator size for aesthetic purposes (this could be a parameter in the config, but haven't applied it in this change).

Changed so field properties are html5 compliant
@@ -59,7 +59,7 @@ - (void) addDecimalButton{
decimalButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self setDecimalChar];
[decimalButton setTitleColor:[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:1.0] forState:UIControlStateNormal];
decimalButton.titleLabel.font = [UIFont systemFontOfSize:40.0];
decimalButton.titleLabel.font = [UIFont systemFontOfSize:30.0];
Copy link
Owner

Choose a reason for hiding this comment

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

Any reason why the font size is reduced ?

@@ -59,7 +59,7 @@ - (void) addDecimalButton{
decimalButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self setDecimalChar];
[decimalButton setTitleColor:[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:1.0] forState:UIControlStateNormal];
decimalButton.titleLabel.font = [UIFont systemFontOfSize:40.0];
decimalButton.titleLabel.font = [UIFont systemFontOfSize:30.0];
Copy link
Owner

Choose a reason for hiding this comment

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

Also i would suggest we better allow both decimal and data-decimal, so that its compatible with old plugin.

Copy link
Author

Choose a reason for hiding this comment

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

The font size alteration was needed in my project, I'll turn it into a preference to be in the config of the plugin, so people can use the size they want.
Also I'll alter this to allow both "data-decimal" and "decimal" to keep compatibility as you suggest.
I'll try to get around it next week as I have to check an iOS11 compatibility issue with this plugin (check the issue I wrote) and make a new pull request with your feedback added.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants