javascript - Angular directive not aplying style -


i have question styles angularjs directives. have imported bootstrap directive progressbars inside project. i'm using inside div class created.

<div class="diagnostics-widget-modal">     <div class="modal-header">         <h3>some content</h3>    </div>    <div class="modal-body">        <div class=left-workflow-area>            <uib-progressbar value="55"></uib-progressbar>        </div>    </div> </div> 

when run page directive html rendered correctly , piece of code becomes following.

<div class="modal-body">     <div class="left-workflow-area">          <div class="progressbar ng-isolate-scope" value="55">               <div class="progress">                    <div class="progress-bar" ng-class="type &amp;&amp; 'progress-bar-' + type" role="progressbar" aria-valuenow="55" aria-valuemin="0" aria-valuemax="100" ng-style="{width: (percent < 100 ? percent: 100) + '%'}" aria-valuetext="%" aria-labelledby="" ng-transclude="" style="width: 100%;">    </div>               </div>          </div>     </div> </div> 

what want style "progress" , "progress-bar" classes. have scss defining left-workflow-area.

 .diagnostics-widget-modal {      height: 100%;      width: 100%;      .modal-header {         height: 71px;         padding: 0 12px 0px 36px;         display: flex;         flex-direction: row;         align-items: center;         justify-content: space-between;         .modal-close {           width: 72px;           height: 72px;           display: flex;           align-items: center;           justify-content: center;         }     }     .modal-body {      display: flex;      flex-direction: row;      justify-content: space-between;      height: 90%;      .left-workflow-area {         display: flex;         width: 70%;         height: 100%;      }      .right-workflow-area {        display: flex;        width: 30%;        height: 100%;      }  } 

i have style file directive not being applied.

.progress {   height: 20px;   margin-bottom: 20px;   overflow: hidden;   background-color: #f5f5f5   border-radius: 4px;   box-shadow: inset 0 1px 2px rgba (0,0,0,.1); } 

if declare class inside "left-workflow-area" being applied correctly. want keep style appart because directive used in different parts in app. how can this?

it works when .progress in .left-workflow-area because generated .left-workflow-area .progress have higher score default  .progress provided bootstrap css.

if not work when .progress outside, looks default .progress override it. may caused bootstrap's css inclusion after own css in html page or in compile process. when css rule have same score, last read browser applied.

so putting vendor's styles before yours should solve problem.

another note : in .progress, semi colon missing in background-color's rule.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -