Hyperstack add dynamic class to manual class namesHow to change an element's class with JavaScript?How do I get a div to float to the bottom of its container?Convert HTML + CSS to PDF with PHP?Which characters are valid in CSS class names/selectors?How can I select an element by name with jQuery?class << self idiom in RubyIs there are way to make a child DIV's width wider than the parent DIV using CSS?What is the best way to conditionally apply a class?CSS transition shorthand with multiple properties?How to add a second css class with a conditional value in razor MVC 4

Federal Pacific 200a main panel problem with oversized 100a 2pole breaker

How to force GCC to assume that a floating-point expression is non-negative?

Do sharpies or markers damage soft rock climbing gear?

How to pass 2>/dev/null as a variable?

Is the internet in Madagascar faster than in UK?

Is there any problem with a full installation on a USB drive?

Book featuring a child learning from a crowdsourced AI book

Why did James Cameron decide to give Alita big eyes?

Is there an in-universe explanation given to the senior Imperial Navy Officers as to why Darth Vader serves Emperor Palpatine?

Notice period 60 days but I need to join in 45 days

Can an object tethered to a spaceship be pulled out of event horizon?

Defending Castle from Zombies

Why did Lucius make a deal out of Buckbeak hurting Draco but not about Draco being turned into a ferret?

Is it true that different variants of the same model aircraft don't require pilot retraining?

Can I lend at the federal funds rate?

Unlock your Lock

How to determine algebraically whether an equation has an infinite solutions or not?

Number of Fingers for a Math Oriented Race

Shift lens vs move body?

Why didn't Doc believe Marty was from the future?

How can I download a file from a host I can only SSH to through another host?

Why was this commercial plane highly delayed mid-flight?

Term used to describe a person who predicts future outcomes

Why is getting a PhD considered "financially irresponsible" by some people?



Hyperstack add dynamic class to manual class names


How to change an element's class with JavaScript?How do I get a div to float to the bottom of its container?Convert HTML + CSS to PDF with PHP?Which characters are valid in CSS class names/selectors?How can I select an element by name with jQuery?class << self idiom in RubyIs there are way to make a child DIV's width wider than the parent DIV using CSS?What is the best way to conditionally apply a class?CSS transition shorthand with multiple properties?How to add a second css class with a conditional value in razor MVC 4






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I need to add a dynamic class to some regular classes while updating syntax for Hyperstack:



div.upload_header.text_left(class: ('uploaded' if 
FileUploads.complete?)) do


Should become something like this:



DIV(class: 'upload-header text-left (dynamic 'uploaded' should go 
here)') do


I just can't seem to figure out how/if regular and dynamic classes can be declared together.










share|improve this question
























  • Welcome to Stack Overflow. You need to add some precision to your question. What is your problem, what have you tried and what is your question. Please see: How to ask

    – probitaille
    Mar 27 at 20:49











  • FYI matt the old haml style (i.e. div.upload_header) is deprecated so you want to get rid of that stuff anyway.

    – Mitch VanDuyn
    Mar 28 at 14:56

















3















I need to add a dynamic class to some regular classes while updating syntax for Hyperstack:



div.upload_header.text_left(class: ('uploaded' if 
FileUploads.complete?)) do


Should become something like this:



DIV(class: 'upload-header text-left (dynamic 'uploaded' should go 
here)') do


I just can't seem to figure out how/if regular and dynamic classes can be declared together.










share|improve this question
























  • Welcome to Stack Overflow. You need to add some precision to your question. What is your problem, what have you tried and what is your question. Please see: How to ask

    – probitaille
    Mar 27 at 20:49











  • FYI matt the old haml style (i.e. div.upload_header) is deprecated so you want to get rid of that stuff anyway.

    – Mitch VanDuyn
    Mar 28 at 14:56













3












3








3








I need to add a dynamic class to some regular classes while updating syntax for Hyperstack:



div.upload_header.text_left(class: ('uploaded' if 
FileUploads.complete?)) do


Should become something like this:



DIV(class: 'upload-header text-left (dynamic 'uploaded' should go 
here)') do


I just can't seem to figure out how/if regular and dynamic classes can be declared together.










share|improve this question














I need to add a dynamic class to some regular classes while updating syntax for Hyperstack:



div.upload_header.text_left(class: ('uploaded' if 
FileUploads.complete?)) do


Should become something like this:



DIV(class: 'upload-header text-left (dynamic 'uploaded' should go 
here)') do


I just can't seem to figure out how/if regular and dynamic classes can be declared together.







html css ruby-on-rails ruby hyperstack






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 27 at 20:42









Matt SaginarioMatt Saginario

434 bronze badges




434 bronze badges















  • Welcome to Stack Overflow. You need to add some precision to your question. What is your problem, what have you tried and what is your question. Please see: How to ask

    – probitaille
    Mar 27 at 20:49











  • FYI matt the old haml style (i.e. div.upload_header) is deprecated so you want to get rid of that stuff anyway.

    – Mitch VanDuyn
    Mar 28 at 14:56

















  • Welcome to Stack Overflow. You need to add some precision to your question. What is your problem, what have you tried and what is your question. Please see: How to ask

    – probitaille
    Mar 27 at 20:49











  • FYI matt the old haml style (i.e. div.upload_header) is deprecated so you want to get rid of that stuff anyway.

    – Mitch VanDuyn
    Mar 28 at 14:56
















Welcome to Stack Overflow. You need to add some precision to your question. What is your problem, what have you tried and what is your question. Please see: How to ask

– probitaille
Mar 27 at 20:49





Welcome to Stack Overflow. You need to add some precision to your question. What is your problem, what have you tried and what is your question. Please see: How to ask

– probitaille
Mar 27 at 20:49













FYI matt the old haml style (i.e. div.upload_header) is deprecated so you want to get rid of that stuff anyway.

– Mitch VanDuyn
Mar 28 at 14:56





FYI matt the old haml style (i.e. div.upload_header) is deprecated so you want to get rid of that stuff anyway.

– Mitch VanDuyn
Mar 28 at 14:56












1 Answer
1






active

oldest

votes


















4















String interpolation can be done conditionally:



DIV(class: "upload-header text-left #'uploaded' if FileUploads.complete?")


The class parameter can also accept an array:



def upload_header_classes
['upload-header', 'text-left'].tap do |classes|
classes << 'uploaded' if FileUploads.complete?
end
end

DIV(class: upload_header_classes)


I'm sure there are plenty of other ways to do it too, this is ruby!






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55386110%2fhyperstack-add-dynamic-class-to-manual-class-names%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4















    String interpolation can be done conditionally:



    DIV(class: "upload-header text-left #'uploaded' if FileUploads.complete?")


    The class parameter can also accept an array:



    def upload_header_classes
    ['upload-header', 'text-left'].tap do |classes|
    classes << 'uploaded' if FileUploads.complete?
    end
    end

    DIV(class: upload_header_classes)


    I'm sure there are plenty of other ways to do it too, this is ruby!






    share|improve this answer





























      4















      String interpolation can be done conditionally:



      DIV(class: "upload-header text-left #'uploaded' if FileUploads.complete?")


      The class parameter can also accept an array:



      def upload_header_classes
      ['upload-header', 'text-left'].tap do |classes|
      classes << 'uploaded' if FileUploads.complete?
      end
      end

      DIV(class: upload_header_classes)


      I'm sure there are plenty of other ways to do it too, this is ruby!






      share|improve this answer



























        4














        4










        4









        String interpolation can be done conditionally:



        DIV(class: "upload-header text-left #'uploaded' if FileUploads.complete?")


        The class parameter can also accept an array:



        def upload_header_classes
        ['upload-header', 'text-left'].tap do |classes|
        classes << 'uploaded' if FileUploads.complete?
        end
        end

        DIV(class: upload_header_classes)


        I'm sure there are plenty of other ways to do it too, this is ruby!






        share|improve this answer













        String interpolation can be done conditionally:



        DIV(class: "upload-header text-left #'uploaded' if FileUploads.complete?")


        The class parameter can also accept an array:



        def upload_header_classes
        ['upload-header', 'text-left'].tap do |classes|
        classes << 'uploaded' if FileUploads.complete?
        end
        end

        DIV(class: upload_header_classes)


        I'm sure there are plenty of other ways to do it too, this is ruby!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 0:24









        adamcreekroadadamcreekroad

        762 bronze badges




        762 bronze badges



















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55386110%2fhyperstack-add-dynamic-class-to-manual-class-names%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현