Hi!
First of all, I think this plugin is great and I can see myself using this a whole lot when developing front-end templates for various projects.
One thing I think worth discussing is the use of the fixie classname and how this may affect your final output on large templates.
What I mean is this, you might have a lot of fixie classes on elements in your dom which is great in the development stage but when you want to move those templates into a CMS it's time to get rid of all those fixie classes.
Options I see are:
- Lots of manual clicking and deleting.
- Regex over the dom removing all instances of "fixie" but this has its own set of issues.
While 2 would be my go-to solution to get rid of those classes the regex could get quite complex because throughout development further classes are likely to be added to fixie elements, and it's not guaranteed that fixie is always the first or last class on an element.
Finding and deleting via regex from all these options would create a pretty complex regex:
<div class="fixie"></div>
<div class="myclass1 fixie"></div>
<div class="myclass1 fixie myclass2"></div>
On line 1 we'd need to remove the class="" as well as fixie the term.
On line 2 we'd only remove the fixie term.
On line 3 we'd remove the fixie term (including the trailing space).
Suggestion: Why not use a data-attribute instead?
Using something exclusive only for use with Fixie would be much easier to match and remove or simply toggle on/off.
<div class="anyclass i want" data-fixie="true"></div>
Now we could safely match the data-fixie="true" term via a regex and 'clean' our HTML document before handover/output/CMS integration without worrying about handing the above mentioned regex matching woes.
Anyway, just some thoughts I wanted to share and see what you guys think of.
Hi!
First of all, I think this plugin is great and I can see myself using this a whole lot when developing front-end templates for various projects.
One thing I think worth discussing is the use of the
fixieclassname and how this may affect your final output on large templates.What I mean is this, you might have a lot of fixie classes on elements in your dom which is great in the development stage but when you want to move those templates into a CMS it's time to get rid of all those fixie classes.
Options I see are:
While 2 would be my go-to solution to get rid of those classes the regex could get quite complex because throughout development further classes are likely to be added to fixie elements, and it's not guaranteed that
fixieis always the first or last class on an element.Finding and deleting via regex from all these options would create a pretty complex regex:
On line 1 we'd need to remove the
class=""as well asfixiethe term.On line 2 we'd only remove the
fixieterm.On line 3 we'd remove the
fixieterm (including the trailing space).Suggestion: Why not use a data-attribute instead?
Using something exclusive only for use with Fixie would be much easier to match and remove or simply toggle on/off.
Now we could safely match the
data-fixie="true"term via a regex and 'clean' ourHTMLdocument before handover/output/CMS integration without worrying about handing the above mentioned regex matching woes.Anyway, just some thoughts I wanted to share and see what you guys think of.