Skip to content
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

pull up webkit-only to cli options: grad.py #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 6 additions & 4 deletions gradify.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Gradify():
"""

# Cross browser prefixes.
BROWSER_PREFIXES = ["", "-webkit-", "-moz-", "-o-", "-ms-"]
BROWSER_PREFIXES = ["-webkit-", "-moz-", "-o-", "-ms-", ""]

# Demo browser execution
DEMO_CMD = {
Expand All @@ -35,8 +35,10 @@ def __init__(self, black_sensitivity=4.3, white_sensitivity = 3, num_colors=4, r

self.num_done = 0

if webkit_only:
self.BROWSER_PREFIXES= ["-webkit-"]
self.init_CLI_args()

if self.args.webkit_only or webkit_only:
self.BROWSER_PREFIXES= ["-webkit-", ""]

self.IGNORED_COLORS = {
"BLACK": {
Expand All @@ -48,7 +50,6 @@ def __init__(self, black_sensitivity=4.3, white_sensitivity = 3, num_colors=4, r
"radius": white_sensitivity
}
}
self.init_CLI_args()

if self.args.demo:
self.demo_file = "demo.html"
Expand Down Expand Up @@ -76,6 +77,7 @@ def init_CLI_args(self):
self.parser.add_argument("-f", "--file", help="Gradify single file")
self.parser.add_argument("-c", "--classname", help="Specific classname of CSS to add gradients to (default is 'gradify')")
self.parser.add_argument("--demo", help="Create example HTML file displaying results, opens when completed", action="store_true")
self.parser.add_argument("--webkit-only", help="Generate css for webkit only", action="store_true")
self.args = self.parser.parse_args()
return

Expand Down