You disabled my product for style="display: none"? Are you seriously?

My demo: https://gps.shopker.org/

I received the following list of remarks:

  1. Your demo is not working correctly. We require a full working demo for all items here at CodeCanyon.

What specifically doesn’t work? Maybe you did not specify a real email address during registration and did not confirm it? How can I fix this if I didn’t get detailed information?

  1. No inline CSS. All CSS must be separated into an external stylesheet.
  2. No inline JavaScript. All JavaScript must be separated into an external file.

I agree that inline CSS and JS code should be kept to a minimum. But if the inline code is used only once, for example, to hide an element (opened via JS), this does not degrade the quality of the code in any way. You don’t follow your own standards. If you open the source code of the site codecanyon[dot]net, then there, too, I see both inline CSS and JS too.

You disabled my product for style=“display: none”? Are you seriously?

I am using code like this in my template:

<script src="{{ asset('bundles/gpstracker/js/app-gps-tracker.js') }}"></script>
    <script>
        var gpsTracker = new GpsTracker();
        gpsTracker.init({
            ...
            lang: '{{ app.request.locale }}',
            autoResize: true,
            onResizeOffsetY: 350
        });
        gpsTracker.addDeviceData({"deviceId": "{{ currentPage.name }}", "title": "{{ currentPage.title }}", "color": "{{ currentPage.color }}", "icon": "{{ currentPage.icon }}"});

        appGpsPagesActions.devicePageButtonsInit({{ currentPage.parentId }}, {{ currentPage.id }}, '{{ app.request.locale }}');
    </script>

Why can’t I do that? All the functions are in a separate file, and in the template I only call these functions and use them to be able to take the current page ID and so on.

If you submit a new item with inline css and js then you will know (if soft reject) inline css and js not allowed only except dynamic css and js. So, if your css come from dynamic then inline acceptable otherwise not.

About demo not working correctly maybe your item got reported that demo is not working well. Or envato team checked your demo and found something wrong.

I would like to recommend fix all things and submit your item will be live again for sale.

Thanks

1 Like

@mgscoder
Thanks for your reply. But you didn’t answer the question about JS in the template. Why can’t I do that?

Second question: What specific CSS code should I remove?

So, if your css come from dynamic then inline acceptable otherwise not.

Why? Can you tell me the reason?

Example #1

document.addEventListener('DOMContentLoaded', function () {
    document.getElementById('myModal').style.display = 'none';
});

Example #2

<div id="myModal" style="display:none;">...

If I do this in a separate JS file like this (Example #1), do you think it would be better if I just do it like this (Example #2)?
I think otherwise, your requirements lead to degradation of the quality of the product.

I know that I can use just CSS classes. But I can fix it in the next version, it’s not critical. I improve the code when I have time for it. But you just turned off the sale of the product and then I have to implement your recommendations as a matter of urgency and push other things aside? I think this is disrespectful to the authors.

dynamic css is always changeable, it’s not a fixed css.

for show hide I would like to go with a css class not your example #1 or #2

Just as an author I recommend what is better to me. now it’s your turn what you would like. If you have any query you can contact author support.

I agree with you and I wrote about it. But I don’t think it’s critical and what it says about the poor quality of the code. Perhaps if I was selling an HTML template it would be important, but I am selling a PHP script. Turning off sales because of such little things is disrespectful to the author.

I wrote that the Example #1 is worse than Example #2, but probably it could pass moderation.

<div id="myModal" class="hidden">
.hidden{display:none;}

@ki-themes
I repeat especially for you:
I wrote that the Example #1 is worse than Example #2, but probably it could pass moderation.

Here is another quote from my comment:

I know that I can use just CSS classes. But I can fix it in the next version, it’s not critical.

If you don’t like the way how the standards are, at some cases, you may be right - it requires more work especially for some basic coding ( jQuery ) but that’s what you need to do to get the item approval.

envato is trying to improve the marketplace and now a days much serious about item quality. envato is trying to clean the marketplace and trying to make all exist items uptodate and market standard. We should to show respect when they will find any issue and asking us to fix. In this way we can achieve more customer trust. If you have only a single inline css issue then it will not take much time to fix and approve. but if you have many inline css/js then you should be serious to check your item and fix those.

1 Like

@mgscoder
I understand. Thank you for your answer.

Hello, try to use HTML5 attribute ‘hidden’:

document.addEventListener('DOMContentLoaded', function () {
    document.getElementById('myModal').setAttribute('hidden', true);
});

it is very convenient in js manipulations