Use form-control to display box-shadow on form inputs/selects upon focus
authorRigel Kent <sendmemail@rigelk.eu>
Thu, 2 Apr 2020 09:39:14 +0000 (11:39 +0200)
committerRigel Kent <sendmemail@rigelk.eu>
Thu, 2 Apr 2020 09:39:14 +0000 (11:39 +0200)
38 files changed:
client/src/app/+about/about-instance/contact-admin-modal.component.html
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
client/src/app/+admin/follows/following-add/following-add.component.scss
client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html
client/src/app/+admin/users/user-edit/user-edit.component.html
client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.html
client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.html
client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html
client/src/app/+my-account/my-account-settings/my-account-interface/my-account-interface-settings.component.html
client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html
client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html
client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html
client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.html
client/src/app/+signup/+register/register-step-user.component.html
client/src/app/+signup/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.html
client/src/app/login/login.component.html
client/src/app/modal/instance-config-warning-modal.component.html
client/src/app/modal/welcome-modal.component.html
client/src/app/search/search-filters.component.html
client/src/app/search/search-filters.component.scss
client/src/app/shared/confirm/confirm.component.html
client/src/app/shared/confirm/confirm.component.ts
client/src/app/shared/forms/markdown-textarea.component.html
client/src/app/shared/moderation/user-ban-modal.component.html
client/src/app/shared/video/modals/video-blacklist.component.html
client/src/app/shared/video/modals/video-download.component.html
client/src/app/shared/video/modals/video-report.component.html
client/src/app/shared/video/video-miniature.component.html
client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.html
client/src/app/videos/+video-edit/shared/video-edit.component.html
client/src/app/videos/+video-edit/shared/video-edit.component.scss
client/src/app/videos/+video-edit/video-add-components/video-upload.component.html
client/src/app/videos/+video-watch/comment/video-comment-add.component.html
client/src/app/videos/+video-watch/modal/video-support.component.html
client/src/sass/application.scss
client/src/sass/bootstrap.scss
client/src/sass/include/_mixins.scss
client/src/sass/include/_variables.scss

index c3c71bdeeba17796bd9e05c542b9175486d3a7c9..7d93796ec7d0f59aab38832722e132e787e3c792 100644 (file)
@@ -10,7 +10,7 @@
       <div class="form-group">
         <label i18n for="fromName">Your name</label>
         <input
-          type="text" id="fromName"
+          type="text" id="fromName" class="form-control"
           formControlName="fromName" [ngClass]="{ 'input-error': formErrors.fromName }"
         >
         <div *ngIf="formErrors.fromName" class="form-error">{{ formErrors.fromName }}</div>
@@ -19,7 +19,7 @@
       <div class="form-group">
         <label i18n for="fromEmail">Your email</label>
         <input
-          type="text" id="fromEmail"
+          type="text" id="fromEmail" class="form-control"
           formControlName="fromEmail" [ngClass]="{ 'input-error': formErrors['fromEmail'] }"
         >
         <div *ngIf="formErrors.fromEmail" class="form-error">{{ formErrors.fromEmail }}</div>
@@ -28,7 +28,7 @@
       <div class="form-group">
         <label i18n for="subject">Subject</label>
         <input
-          type="text" id="subject"
+          type="text" id="subject" class="form-control"
           formControlName="subject" [ngClass]="{ 'input-error': formErrors['subject'] }"
         >
         <div *ngIf="formErrors.subject" class="form-error">{{ formErrors.subject }}</div>
@@ -36,7 +36,7 @@
 
       <div class="form-group">
         <label i18n for="body">Your message</label>
-        <textarea id="body" formControlName="body" [ngClass]="{ 'input-error': formErrors['body'] }">
+        <textarea id="body" formControlName="body" class="form-control" [ngClass]="{ 'input-error': formErrors['body'] }">
         </textarea>
         <div *ngIf="formErrors.body" class="form-error">{{ formErrors.body }}</div>
       </div>
       <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
 
       <div class="form-group inputs">
-        <span i18n class="action-button action-button-cancel" (click)="hide()">
-          Cancel
-        </span>
+        <input
+          type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+          (click)="hide()" (key.enter)="hide()"
+        >
 
         <input
           type="submit" i18n-value value="Submit" class="action-button-submit"
index bde27b206c069ed9f0315c695739d453b9f3ef87..4ce4c18fc886a4133b3ed30fe6a42a39cd03a7ec 100644 (file)
@@ -19,7 +19,7 @@
               <div class="form-group">
                 <label i18n for="instanceName">Name</label>
                 <input
-                  type="text" id="instanceName"
+                  type="text" id="instanceName" class="form-control"
                   formControlName="name" [ngClass]="{ 'input-error': formErrors.instance.name }"
                 >
                 <div *ngIf="formErrors.instance.name" class="form-error">{{ formErrors.instance.name }}</div>
@@ -28,7 +28,7 @@
               <div class="form-group">
                 <label i18n for="instanceShortDescription">Short description</label>
                 <textarea
-                  id="instanceShortDescription" formControlName="shortDescription" class="small"
+                  id="instanceShortDescription" formControlName="shortDescription" class="form-control small"
                   [ngClass]="{ 'input-error': formErrors['instance.shortDescription'] }"
                 ></textarea>
                 <div *ngIf="formErrors.instance.shortDescription" class="form-error">{{ formErrors.instance.shortDescription }}</div>
                 </my-help>
 
                 <div class="peertube-select-container">
-                  <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy">
+                  <select id="instanceDefaultNSFWPolicy" formControlName="defaultNSFWPolicy" class="form-control">
                     <option i18n value="do_not_list">Do not list</option>
                     <option i18n value="blur">Blur thumbnails</option>
                     <option i18n value="display">Display</option>
                 <div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div>
 
                 <textarea
-                  id="instanceCreationReason" formControlName="creationReason" class="small"
+                  id="instanceCreationReason" formControlName="creationReason" class="small" class="form-control"
                   [ngClass]="{ 'input-error': formErrors['instance.creationReason'] }"
                 ></textarea>
                 <div *ngIf="formErrors.instance.creationReason" class="form-error">{{ formErrors.instance.creationReason }}</div>
                 <div i18n class="label-small-info">It's important to know for users who want to register on your instance</div>
 
                 <textarea
-                  id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="small"
+                  id="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" class="form-control small"
                   [ngClass]="{ 'input-error': formErrors['instance.maintenanceLifetime'] }"
                 ></textarea>
                 <div *ngIf="formErrors.instance.maintenanceLifetime" class="form-error">{{ formErrors.instance.maintenanceLifetime }}</div>
                 <div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div>
 
                 <textarea
-                  id="instanceBusinessModel" formControlName="businessModel" class="small"
+                  id="instanceBusinessModel" formControlName="businessModel" class="form-control small"
                   [ngClass]="{ 'input-error': formErrors['instance.businessModel'] }"
                 ></textarea>
                 <div *ngIf="formErrors.instance.businessModel" class="form-error">{{ formErrors.instance.businessModel }}</div>
                 <label i18n for="themeDefault">Theme</label>
 
                 <div class="peertube-select-container">
-                  <select formControlName="default" id="themeDefault">
+                  <select formControlName="default" id="themeDefault" class="form-control">
                     <option i18n value="default">default</option>
 
                     <option *ngFor="let theme of availableThemes" [value]="theme">{{ theme }}</option>
             <div class="form-group" formGroupName="instance">
               <label i18n for="instanceDefaultClientRoute">Landing page</label>
               <div class="peertube-select-container">
-                <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute">
+                <select id="instanceDefaultClientRoute" formControlName="defaultClientRoute" class="form-control">
                   <option i18n value="/videos/overview">Discover videos</option>
                   <option i18n value="/videos/trending">Trending videos</option>
                   <option i18n value="/videos/most-liked">Most liked videos</option>
                     <div [ngClass]="{ 'disabled-checkbox-extra': !isSignupEnabled() }" class="mt-3">
                       <label i18n for="signupLimit">Signup limit</label>
                       <input
-                        type="number" min="-1" id="signupLimit"
+                        type="number" min="-1" id="signupLimit" class="form-control"
                         formControlName="limit" [ngClass]="{ 'input-error': formErrors['signup.limit'] }"
                       >
                       <div *ngIf="formErrors.signup.limit" class="form-error">{{ formErrors.signup.limit }}</div>
               <div class="form-group">
                 <label i18n for="userVideoQuota">Default video quota per user</label>
                 <div class="peertube-select-container">
-                  <select id="userVideoQuota" formControlName="videoQuota">
+                  <select id="userVideoQuota" formControlName="videoQuota" class="form-control">
                     <option *ngFor="let videoQuotaOption of videoQuotaOptions" [value]="videoQuotaOption.value">
                       {{ videoQuotaOption.label }}
                     </option>
               <div class="form-group">
                 <label i18n for="userVideoQuotaDaily">Default daily upload limit per user</label>
                 <div class="peertube-select-container">
-                  <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily">
+                  <select id="userVideoQuotaDaily" formControlName="videoQuotaDaily" class="form-control">
                     <option *ngFor="let videoQuotaDailyOption of videoQuotaDailyOptions" [value]="videoQuotaDailyOption.value">
                       {{ videoQuotaDailyOption.label }}
                     </option>
                         <div [ngClass]="{ 'disabled-checkbox-extra': !isAutoFollowIndexEnabled() }">
                           <label i18n for="followingsInstanceAutoFollowIndexUrl">Index URL</label>
                           <input
-                            type="text" id="followingsInstanceAutoFollowIndexUrl"
+                            type="text" id="followingsInstanceAutoFollowIndexUrl" class="form-control"
                             formControlName="indexUrl" [ngClass]="{ 'input-error': formErrors['followings.instance.autoFollowIndex.indexUrl'] }"
                           >
                           <div *ngIf="formErrors.followings.instance.autoFollowIndex.indexUrl" class="form-error">{{ formErrors.followings.instance.autoFollowIndex.indexUrl }}</div>
             <div class="form-group" formGroupName="admin">
               <label i18n for="adminEmail">Admin email</label>
               <input
-                type="text" id="adminEmail"
+                type="text" id="adminEmail" class="form-control"
                 formControlName="email" [ngClass]="{ 'input-error': formErrors['admin.email'] }"
               >
               <div *ngIf="formErrors.admin.email" class="form-error">{{ formErrors.admin.email }}</div>
                   <label i18n for="signupLimit">Your Twitter username</label>
 
                   <input
-                    type="text" id="servicesTwitterUsername"
+                    type="text" id="servicesTwitterUsername" class="form-control"
                     formControlName="username" [ngClass]="{ 'input-error': formErrors['services.twitter.username'] }"
                   >
                   <div *ngIf="formErrors.services.twitter.username" class="form-error">{{ formErrors.services.twitter.username }}</div>
                 <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isTranscodingEnabled() }">
                   <label i18n for="transcodingThreads">Transcoding threads</label>
                   <div class="peertube-select-container">
-                    <select id="transcodingThreads" formControlName="threads">
+                    <select id="transcodingThreads" formControlName="threads" class="form-control">
                       <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value">
                         {{ transcodingThreadOption.label }}
                       </option>
               <div class="form-group" formGroupName="previews">
                 <label i18n for="cachePreviewsSize">Number of previews to keep in cache</label>
                 <input
-                  type="number" min="0" id="cachePreviewsSize"
+                  type="number" min="0" id="cachePreviewsSize" class="form-control"
                   formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.previews.size'] }"
                 >
                 <div *ngIf="formErrors.cache.previews.size" class="form-error">{{ formErrors.cache.previews.size }}</div>
               <div class="form-group" formGroupName="captions">
                 <label i18n for="cacheCaptionsSize">Number of video captions to keep in cache</label>
                 <input
-                  type="number" min="0" id="cacheCaptionsSize"
+                  type="number" min="0" id="cacheCaptionsSize" class="form-control"
                   formControlName="size" [ngClass]="{ 'input-error': formErrors['cache.captions.size'] }"
                 >
                 <div *ngIf="formErrors.cache.captions.size" class="form-error">{{ formErrors.cache.captions.size }}</div>
                   </my-help>
 
                   <textarea
-                    id="customizationJavascript" formControlName="javascript"
+                    id="customizationJavascript" formControlName="javascript" class="form-control"
                     [ngClass]="{ 'input-error': formErrors['instance.customizations.javascript'] }"
                   ></textarea>
 
                   </my-help>
 
                   <textarea
-                    id="customizationCSS" formControlName="css"
+                    id="customizationCSS" formControlName="css" class="form-control"
                     [ngClass]="{ 'input-error': formErrors['instance.customizations.css'] }"
                   ></textarea>
                   <div *ngIf="formErrors.instance.customizations.css" class="form-error">{{ formErrors.instance.customizations.css }}</div>
index df104c14eca1143ee9d1dbebc3cd46cf730de3c5..7594b502c2ed814f736fb0d1a22695a4a576aa0e 100644 (file)
@@ -5,13 +5,6 @@ textarea {
   height: 250px;
 }
 
-.form-control {
-  &, &:focus {
-    background-color: var(--inputBackgroundColor);
-    color: var(--mainForegroundColor);
-  }
-}
-
 input[type=submit] {
   @include peertube-button;
   @include orange-button;
index 303a788d2e4b5970d019c2c87b7c4ebe709c2324..8fbd33871a4636693edc4fa352b483ad4faae76a 100644 (file)
       </div>
 
       <div class="form-group inputs">
-        <span i18n class="action-button action-button-cancel" (click)="hide()">Cancel</span>
+        <input
+          type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+          (click)="hide()" (key.enter)="hide()"
+        >
 
         <input
           type="submit" i18n-value value="Update this comment" class="action-button-submit"
index 6c42fde570b908e0efb0c16ebac58144e49e25ff..070695e575afc3debd27d251ed092a27cc44485f 100644 (file)
@@ -82,7 +82,7 @@
       <div class="form-group" *ngIf="isCreation()">
         <label i18n for="username">Username</label>
         <input
-          type="text" id="username" i18n-placeholder placeholder="john"
+          type="text" id="username" i18n-placeholder placeholder="john" class="form-control"
           formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
         >
         <div *ngIf="formErrors.username" class="form-error">
@@ -93,7 +93,7 @@
       <div class="form-group">
         <label i18n for="email">Email</label>
         <input
-          type="text" id="email" i18n-placeholder placeholder="mail@example.com"
+          type="text" id="email" i18n-placeholder placeholder="mail@example.com" class="form-control"
           formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }"
           autocomplete="off"
         >
           </ng-template>
         </my-help>
         <input
-          type="password" id="password" autocomplete="new-password"
+          type="password" id="password" autocomplete="new-password" class="form-control"
           formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
         >
         <div *ngIf="formErrors.password" class="form-error">
index 674a4e8a27faeaf78782f2ebcbc30d59c9ddc280..a155d90e0af44330bfd407457721a80e626c3edd 100644 (file)
 
   <div class="modal-footer inputs">
     <div class="form-group inputs">
-      <span i18n class="action-button action-button-cancel" (click)="dismiss()">
-        Cancel
-      </span>
+      <input
+        type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+        (click)="dismiss()" (key.enter)="dismiss()"
+      >
 
       <input
           type="submit" i18n-value value="Submit" class="action-button-submit"
index 76886c73e21ef054a8b4a0647f6547a2e428234c..f39f66696c96e7caf274178554613c0dd42b34fa 100644 (file)
@@ -14,7 +14,7 @@
   <div class="form-group">
     <label i18n for="new-email">New email</label>
     <input
-      type="email" id="new-email" i18n-placeholder placeholder="Your new email"
+      type="email" id="new-email" i18n-placeholder placeholder="Your new email" class="form-control"
       formControlName="new-email" [ngClass]="{ 'input-error': formErrors['new-email'] }"
     >
     <div *ngIf="formErrors['new-email']" class="form-error">
@@ -25,7 +25,7 @@
   <div class="form-group">
     <input
       type="password" id="password" i18n-placeholder placeholder="Your password" autocomplete="off"
-      formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
+      formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }" class="form-control"
     >
     <div *ngIf="formErrors['password']" class="form-error">
       {{ formErrors['password'] }}
index cec70c6b57f3ea1487070f4537668c875685491c..4756cfecdc1e2579aaad2d8949804624ac83884e 100644 (file)
@@ -5,7 +5,7 @@
   <label i18n for="current-password">Change password</label>
   <input
     type="password" id="current-password" i18n-placeholder placeholder="Current password" autocomplete="current-password"
-    formControlName="current-password" [ngClass]="{ 'input-error': formErrors['current-password'] }"
+    formControlName="current-password" [ngClass]="{ 'input-error': formErrors['current-password'] }" class="form-control"
   >
   <div *ngIf="formErrors['current-password']" class="form-error">
     {{ formErrors['current-password'] }}
@@ -13,7 +13,7 @@
 
   <input
     type="password" id="new-password" i18n-placeholder placeholder="New password" autocomplete="new-password"
-    formControlName="new-password" [ngClass]="{ 'input-error': formErrors['new-password'] }"
+    formControlName="new-password" [ngClass]="{ 'input-error': formErrors['new-password'] }" class="form-control"
   >
   <div *ngIf="formErrors['new-password']" class="form-error">
     {{ formErrors['new-password'] }}
@@ -21,7 +21,7 @@
 
   <input
     type="password" id="new-confirmed-password" i18n-placeholder placeholder="Confirm new password" autocomplete="new-password"
-    formControlName="new-confirmed-password"
+    formControlName="new-confirmed-password" class="form-control"
   >
   <div *ngIf="formErrors['new-confirmed-password']" class="form-error">
     {{ formErrors['new-confirmed-password'] }}
index 6f48d8f7d405b6ebd4a7e5a6cfd82622e6e98dfe..b12184ddc81908ec851bd73dd39386621bda4fd3 100644 (file)
@@ -3,7 +3,7 @@
     <label i18n for="theme">Theme</label>
 
     <div class="peertube-select-container">
-      <select formControlName="theme" id="theme">
+      <select formControlName="theme" id="theme" class="form-control">
         <option i18n value="instance-default">instance default</option>
         <option i18n value="default">peertube default</option>
 
index 14e51f57cf65fbc8d871c47821a91d67c495534c..818e34ee0fad0ff83b1c050192f2810262436da7 100644 (file)
@@ -5,7 +5,7 @@
   <div class="form-group">
     <label i18n for="display-name">Display name</label>
     <input
-      type="text" id="display-name"
+      type="text" id="display-name" class="form-control"
       formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }"
     >
     <div *ngIf="formErrors['display-name']" class="form-error">
@@ -16,7 +16,7 @@
   <div class="form-group">
     <label i18n for="description">Description</label>
     <textarea
-      id="description" formControlName="description"
+      id="description" formControlName="description" class="form-control"
       [ngClass]="{ 'input-error': formErrors['description'] }"
     ></textarea>
     <div *ngIf="formErrors.description" class="form-error">
index 7f4437b19bcdf7f837be9fcd32209ee6189b3089..5e95e2f9a0e37b9a4571d3b9a9b48f49f0c0acf5 100644 (file)
@@ -10,7 +10,7 @@
     </my-help>
 
     <div class="peertube-select-container">
-      <select id="nsfwPolicy" formControlName="nsfwPolicy">
+      <select id="nsfwPolicy" formControlName="nsfwPolicy" class="form-control">
         <option i18n value="do_not_list">Do not list</option>
         <option i18n value="blur">Blur thumbnails</option>
         <option i18n value="display">Display</option>
index 29d2b935d186aa132078bbf5f98c7b31fe6e8311..59ac5097b18715c261046ddf71824ff5ab7992ba 100644 (file)
@@ -33,7 +33,7 @@
         <div class="input-group">
           <input
             type="text" id="name" i18n-placeholder placeholder="Example: my_channel"
-            formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }"
+            formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }" class="form-control"
           >
           <div class="input-group-append">
             <span class="input-group-text">@{{ instanceHost }}</span>
@@ -52,7 +52,7 @@
       <div class="form-group">
         <label i18n for="display-name">Display name</label>
         <input
-          type="text" id="display-name"
+          type="text" id="display-name" class="form-control"
           formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }"
         >
         <div *ngIf="formErrors['display-name']" class="form-error">
@@ -63,7 +63,7 @@
       <div class="form-group">
         <label i18n for="description">Description</label>
         <textarea
-          id="description" formControlName="description"
+          id="description" formControlName="description" class="form-control"
           [ngClass]="{ 'input-error': formErrors['description'] }"
         ></textarea>
         <div *ngIf="formErrors.description" class="form-error">
index 22f1279044430f01c77ee4a46638038bfaf127e0..9d809d2bf0758d7660137bb36eb82ad3e527e4ba 100644 (file)
 
   <div class="modal-footer inputs">
     <div class="form-group inputs">
-      <span i18n class="action-button action-button-cancel" (click)="dismiss()">
-        Cancel
-      </span>
+      <input
+        type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+        (click)="dismiss()" (key.enter)="dismiss()"
+      >
 
       <input
         type="submit" i18n-value value="Submit" class="action-button-submit"
index 6bac4e4a4d00ab3ceb1cd654fb4fc9c9c352d746..1bd378b13d340a1df12b395fb5a36d4cfbaf7b57 100644 (file)
@@ -21,7 +21,7 @@
     <div class="input-group">
       <input
         type="text" id="username" i18n-placeholder placeholder="Example: jane_doe"
-        formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }"
+        formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }"
       >
       <div class="input-group-append">
         <span class="input-group-text">@{{ instanceHost }}</span>
@@ -41,7 +41,7 @@
     <label for="email" i18n>Email</label>
     <input
       type="text" id="email" i18n-placeholder placeholder="Email"
-      formControlName="email" [ngClass]="{ 'input-error': formErrors['email'] }"
+      formControlName="email" class="form-control" [ngClass]="{ 'input-error': formErrors['email'] }"
     >
     <div *ngIf="formErrors.email" class="form-error">
       {{ formErrors.email }}
@@ -52,7 +52,7 @@
     <label for="password" i18n>Password</label>
     <input
       type="password" id="password" i18n-placeholder placeholder="Password" autocomplete="new-password"
-      formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
+      formControlName="password" class="form-control" [ngClass]="{ 'input-error': formErrors['password'] }"
     >
     <div *ngIf="formErrors.password" class="form-error">
       {{ formErrors.password }}
index 2e4180632a6fdf786b2ffc7675175de82b76677f..ece9d102278a4555d2e97d0460ad8bad057c76e4 100644 (file)
@@ -8,7 +8,7 @@
       <label i18n for="verify-email-email">Email</label>
       <input
         type="email" id="verify-email-email" i18n-placeholder placeholder="Email address" required
-        formControlName="verify-email-email" [ngClass]="{ 'input-error': formErrors['verify-email-email'] }"
+        formControlName="verify-email-email" class="form-control" [ngClass]="{ 'input-error': formErrors['verify-email-email'] }"
       >
       <div *ngIf="formErrors['verify-email-email']" class="form-error">
           {{ formErrors['verify-email-email'] }}
index 38b59a1eb6d2eb69840c92937312843162d5bf69..3a2d4b8768803867e76f45387dff9af72d6aa884 100644 (file)
@@ -28,7 +28,7 @@
         <label i18n for="username">User</label>
         <input
           type="text" id="username" i18n-placeholder placeholder="Username or email address" required tabindex="1"
-          formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" #emailInput
+          formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }" #emailInput
         >
         <a i18n *ngIf="signupAllowed === true" routerLink="/signup" class="create-an-account">
           or create an account
@@ -45,7 +45,7 @@
       <div>
         <input
           type="password" name="password" id="password" i18n-placeholder placeholder="Password" required tabindex="2" autocomplete="current-password"
-          formControlName="password" [ngClass]="{ 'input-error': formErrors['password'] }"
+          formControlName="password" class="form-control" [ngClass]="{ 'input-error': formErrors['password'] }"
         >
         <a i18n-title class="forgot-password-button" (click)="openForgotPasswordModal()" title="Click here to reset your password">I forgot my password</a>
       </div>
   </div>
 
   <div class="modal-footer inputs">
-    <span i18n class="action-button action-button-cancel" (click)="hideForgotPasswordModal()">Cancel</span>
+    <input
+      type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+      (click)="hideForgotPasswordModal()" (key.enter)="hideForgotPasswordModal()"
+    >
 
     <input
       type="submit" i18n-value value="Send me an email to reset my password" class="action-button-submit"
index e303104c5b594cb49e5f7b35832ffb19d06ccdc3..44c994bc839a72d917f3a40e34385545c3020917 100644 (file)
 
     </my-peertube-checkbox>
 
-    <span i18n class="action-button action-button-cancel" (click)="hide()">Close</span>
+    <input
+      type="button" role="button" i18n-value value="Close" class="action-button action-button-cancel"
+      (click)="hide()" (key.enter)="hide()"
+    >
   </div>
 
 </ng-template>
index 9b210eb4d6db917a96a89860f662db531f1f9971..8bfcc4bf69fd495b803288a744a894c833725fc1 100644 (file)
   </div>
 
   <div class="modal-footer inputs">
-    <span i18n class="action-button action-button-understood" (click)="hide()">Remind me later</span>
-
-    <a i18n (click)="doNotOpenAgain(); hide()" class="configure-instance-button" href="/admin/config/edit-custom" target="_blank"
-       rel="noopener noreferrer">
+    <input
+      type="button" role="button" i18n-value value="Remind me later" class="action-button action-button-understood"
+      (click)="hide()" (key.enter)="hide()"
+    >
+
+    <a i18n (click)="doNotOpenAgain(); hide()" (key.enter)="doNotOpenAgain(); hide()"
+       class="configure-instance-button" href="/admin/config/edit-custom" target="_blank"
+       rel="noopener noreferrer" ngbAutofocus>
       Configure my instance
     </a>
   </div>
index 60680c7bd9f90fc2dd501d8210bd4d119abedbce..54fc7338fd37ac72e757729f1dfd1e8c8d6feb1c 100644 (file)
@@ -46,6 +46,7 @@
               type="text" id="original-publication-after" name="original-publication-after"
               i18n-placeholder placeholder="After..."
               [(ngModel)]="originallyPublishedStartYear"
+              class="form-control"
             >
           </div>
           <div class="col-sm-6">
@@ -55,6 +56,7 @@
               type="text" id="original-publication-before" name="original-publication-before"
               i18n-placeholder placeholder="Before..."
               [(ngModel)]="originallyPublishedEndYear"
+              class="form-control"
             >
           </div>
         </div>
           Reset
         </button>
         <div class="peertube-select-container">
-          <select id="category" name="category" [(ngModel)]="advancedSearch.categoryOneOf">
+          <select id="category" name="category" [(ngModel)]="advancedSearch.categoryOneOf" class="form-control">
             <option [value]="undefined" i18n>Display all categories</option>
             <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option>
           </select>
           Reset
         </button>
         <div class="peertube-select-container">
-          <select id="licence" name="licence" [(ngModel)]="advancedSearch.licenceOneOf">
+          <select id="licence" name="licence" [(ngModel)]="advancedSearch.licenceOneOf" class="form-control">
             <option [value]="undefined" i18n>Display all licenses</option>
             <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option>
           </select>
           Reset
         </button>
         <div class="peertube-select-container">
-          <select id="language" name="language" [(ngModel)]="advancedSearch.languageOneOf">
+          <select id="language" name="language" [(ngModel)]="advancedSearch.languageOneOf" class="form-control">
             <option [value]="undefined" i18n>Display all languages</option>
             <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option>
           </select>
index 99af2e4c52931227c22f6dfc3693eb8edb6f20e0..edd85bc707564b0f2f32ccead60accfd1bbce697 100644 (file)
@@ -66,65 +66,4 @@ input[type=submit] {
   white-space: nowrap;
 }
 
-::ng-deep {
-  .ng2-tag-input {
-    border: none !important;
-  }
-
-  .ng2-tags-container {
-    display: flex;
-    align-items: center;
-    border: 1px solid #C6C6C6;
-    border-radius: 3px;
-    padding: 5px !important;
-    height: max-content;
-  }
-
-  tag-input-form {
-    input {
-      height: 30px !important;
-      font-size: 12px !important;
-
-      background-color: var(--mainBackgroundColor) !important;
-      color: var(--mainForegroundColor) !important;
-    }
-  }
-
-  tag {
-    background-color: $grey-background-color !important;
-    color: #000 !important;
-    border-radius: 3px !important;
-    font-size: 12px !important;
-    height: 30px !important;
-    line-height: 30px !important;
-    margin: 0 5px 0 0 !important;
-    cursor: default !important;
-    padding: 0 8px 0 10px !important;
-
-    div {
-      height: 100% !important;
-    }
-  }
-
-  delete-icon {
-    cursor: pointer !important;
-    height: auto !important;
-    vertical-align: middle !important;
-    padding-left: 6px !important;
-
-    svg {
-      position: relative;
-      top: -1px;
-      height: auto !important;
-      vertical-align: middle !important;
-
-      path  {
-        fill: $grey-foreground-color !important;
-      }
-    }
-
-    &:hover {
-      transform: none !important;
-    }
-  }
-}
+@include ng2-tags
index 65df1cd4dfab6967cc5d1dbe88b1976c1a47b7a6..dbc8c23e3a2c0e3295286c2397cffbb59f0e89a7 100644 (file)
   </div>
 
   <div class="modal-footer inputs">
-    <span i18n class="action-button action-button-cancel" (click)="dismiss()" role="button">Cancel</span>
+    <input
+      type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+      (click)="dismiss()" (key.enter)="dismiss()"
+    >
 
     <input
+      ngbAutofocus
       type="submit" [value]="confirmButtonText" class="action-button-submit" [disabled]="isConfirmationDisabled()"
-      (click)="close()"
+      (click)="close()" (key.enter)="confirm()"
     >
   </div>
 </ng-template>
index d67d4f3c8c7eee890c713c0302fab2cbdc7d07b4..c6e40fe72a8c20ce173a34eb588669669a9be700 100644 (file)
@@ -45,7 +45,6 @@ export class ConfirmComponent implements OnInit {
     )
   }
 
-  @HostListener('document:keydown.enter')
   confirm () {
     if (this.openedModal) this.openedModal.close()
   }
index fb6e1343d66c2852719ca5ef15053e54270870ce..3cadb361993501edb44fee4385dffb443f8b6505 100644 (file)
@@ -1,7 +1,8 @@
 <div class="root" [ngStyle]="{ 'flex-direction': flexDirection }">
   <textarea
     [(ngModel)]="content" (ngModelChange)="onModelChange()"
-    [ngClass]="classes" [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }"
+    class="form-control" [ngClass]="classes"
+    [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }"
     [id]="name" [name]="name">
   </textarea>
 
index f38ea543d2efebf1aeed715544a5d8253156b784..365eb1938d7ee59d730f5bcd9eedeb592a0d7e43 100644 (file)
@@ -8,8 +8,10 @@
   <div class="modal-body">
     <form novalidate [formGroup]="form" (ngSubmit)="banUser()">
       <div class="form-group">
-        <textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }">
-        </textarea>
+        <textarea
+          i18n-placeholder placeholder="Reason..." formControlName="reason"
+          class="form-control" [ngClass]="{ 'input-error': formErrors['reason'] }"
+        ></textarea>
         <div *ngIf="formErrors.reason" class="form-error">
           {{ formErrors.reason }}
         </div>
       </div>
 
       <div class="form-group inputs">
-        <span i18n class="action-button action-button-cancel" (click)="hide()">Cancel</span>
+        <input
+          type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+          (click)="hide()" (key.enter)="hide()"
+        >
 
         <input
           type="submit" i18n-value value="Ban this user" class="action-button-submit"
index 857a4dcecd9dda334c82623745f934d408206e8d..8f06a6b027bd1b98ab494043258c76813388b76a 100644 (file)
@@ -8,8 +8,10 @@
 
     <form novalidate [formGroup]="form" (ngSubmit)="blacklist()">
       <div class="form-group">
-        <textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }">
-        </textarea>
+        <textarea
+          i18n-placeholder placeholder="Reason..." formControlName="reason"
+          [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control"
+        ></textarea>
         <div *ngIf="formErrors.reason" class="form-error">
           {{ formErrors.reason }}
         </div>
       </div>
 
       <div class="form-group inputs">
-        <span i18n class="action-button action-button-cancel" (click)="hide()">
-          Cancel
-        </span>
+        <input
+          type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+          (click)="hide()" (key.enter)="hide()"
+        >
 
         <input
           type="submit" i18n-value value="Submit" class="action-button-submit"
index ab6f4449dc50a4f0d311a85da2aae0c85add85cb..c65e371eee33cd00156c7f53b6fd8d3e20eebba5 100644 (file)
   </div>
 
   <div class="modal-footer inputs">
-    <span i18n class="action-button action-button-cancel" (click)="hide()">
-      Cancel
-    </span>
+    <input
+      type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+      (click)="hide()" (key.enter)="hide()"
+    >
 
     <input
       type="submit" i18n-value value="Download" class="action-button-submit"
index cc1d361b3d1dffe91569d66a67f217eabc295b35..e336b666038ea222bc5be8eb963459969ceb8d2b 100644 (file)
 
     <form novalidate [formGroup]="form" (ngSubmit)="report()">
       <div class="form-group">
-        <textarea i18n-placeholder placeholder="Reason..." formControlName="reason" [ngClass]="{ 'input-error': formErrors['reason'] }">
-        </textarea>
+        <textarea 
+          i18n-placeholder placeholder="Reason..." formControlName="reason"
+          [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control"
+        ></textarea>
         <div *ngIf="formErrors.reason" class="form-error">
           {{ formErrors.reason }}
         </div>
       </div>
 
       <div class="form-group inputs">
-        <span i18n class="action-button action-button-cancel" (click)="hide()">
-          Cancel
-        </span>
+        <input
+          type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+          (click)="hide()" (key.enter)="hide()"
+        >
 
         <input
           type="submit" i18n-value value="Submit" class="action-button-submit"
index 819be6d483c1cf014e7b4bbe8ee893f5ba00ea8f..6a8558de3764e592e80be7ff9367779a1b2e6136 100644 (file)
@@ -52,7 +52,7 @@
     <div class="video-actions">
       <!-- FIXME: remove bottom placement when overflow is fixed in bootstrap dropdown: https://github.com/ng-bootstrap/ng-bootstrap/issues/3495 -->
       <my-video-actions-dropdown
-        *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left"
+        *ngIf="showActions" [video]="video" [displayOptions]="videoActionsDisplayOptions" placement="bottom-left bottom-right left auto"
         (videoRemoved)="onVideoRemoved()" (videoBlacklisted)="onVideoBlacklisted()" (videoUnblacklisted)="onVideoUnblacklisted()"
       ></my-video-actions-dropdown>
     </div>
index 19043eee6e89fc749572a77ffc8a0ee3f12766e7..4262ff0fced1faa5aafc632fc3aab15029bfac6a 100644 (file)
     </div>
 
     <div class="modal-footer inputs">
-      <span i18n class="action-button action-button-cancel" (click)="hide()">
-        Cancel
-      </span>
+      <input
+        type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+        (click)="hide()" (key.enter)="hide()"
+      >
 
       <input
         type="submit" i18n-value value="Add this caption" class="action-button-submit"
index 967f3b188ff48ea3d3942b1aaaf99e88a01298dd..152b069d279a4da34f47f175764dd2c5111a1ec7 100644 (file)
@@ -9,7 +9,7 @@
           <div class="col-md-8">
             <div class="form-group">
               <label i18n for="name">Title</label>
-              <input type="text" id="name" formControlName="name" />
+              <input type="text" id="name" class="form-control" formControlName="name" />
               <div *ngIf="formErrors.name" class="form-error">
                 {{ formErrors.name }}
               </div>
@@ -58,7 +58,7 @@
             <div class="form-group">
               <label i18n>Channel</label>
               <div class="peertube-select-container">
-                <select formControlName="channelId">
+                <select formControlName="channelId" class="form-control">
                   <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
                 </select>
               </div>
@@ -67,7 +67,7 @@
             <div class="form-group">
               <label i18n for="category">Category</label>
               <div class="peertube-select-container">
-                <select id="category" formControlName="category">
+                <select id="category" formControlName="category" class="form-control">
                   <option></option>
                   <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option>
                 </select>
@@ -81,7 +81,7 @@
             <div class="form-group">
               <label i18n for="licence">Licence</label>
               <div class="peertube-select-container">
-                <select id="licence" formControlName="licence">
+                <select id="licence" formControlName="licence" class="form-control">
                   <option></option>
                   <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option>
                 </select>
@@ -95,7 +95,7 @@
             <div class="form-group">
               <label i18n for="language">Language</label>
               <div class="peertube-select-container">
-                <select id="language" formControlName="language">
+                <select id="language" formControlName="language" class="form-control">
                   <option></option>
                   <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option>
                 </select>
             <div class="form-group">
               <label i18n for="privacy">Privacy</label>
               <div class="peertube-select-container">
-                <select id="privacy" formControlName="privacy">
+                <select id="privacy" formControlName="privacy" class="form-control">
                   <option></option>
                   <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
                   <option *ngIf="schedulePublicationPossible" [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option>
index 90d26e13d7da943066b3652e75888cb7a4b84d07..1b7bc56b4ac6216aae01f7ccedafb49f2e5ab8d4 100644 (file)
@@ -1,6 +1,11 @@
 @import '_variables';
 @import '_mixins';
 
+label {
+  font-weight: $font-regular;
+  font-size: 100%;
+}
+
 .peertube-select-container {
   @include peertube-select-container(auto);
 }
@@ -148,65 +153,4 @@ p-calendar {
   }
 }
 
-::ng-deep {
-  .ng2-tag-input {
-    border: none !important;
-  }
-
-  .ng2-tags-container {
-    display: flex;
-    align-items: center;
-    border: 1px solid #C6C6C6;
-    border-radius: 3px;
-    padding: 5px !important;
-    height: max-content;
-  }
-
-  tag-input-form {
-    input {
-      height: 30px !important;
-      font-size: 12px !important;
-
-      background-color: var(--mainBackgroundColor) !important;
-      color: var(--mainForegroundColor) !important;
-    }
-  }
-
-  tag {
-    background-color: $grey-background-color !important;
-    color: #000 !important;
-    border-radius: 3px !important;
-    font-size: 12px !important;
-    height: 30px !important;
-    line-height: 30px !important;
-    margin: 0 5px 0 0 !important;
-    cursor: default !important;
-    padding: 0 8px 0 10px !important;
-
-    div {
-      height: 100% !important;
-    }
-  }
-
-  delete-icon {
-    cursor: pointer !important;
-    height: auto !important;
-    vertical-align: middle !important;
-    padding-left: 6px !important;
-
-    svg {
-      position: relative;
-      top: -1px;
-      height: auto !important;
-      vertical-align: middle !important;
-
-      path  {
-        fill: $grey-foreground-color !important;
-      }
-    }
-
-    &:hover {
-      transform: none !important;
-    }
-  }
-}
+@include ng2-tags
index 3cb57e37519ec7a36d032f71422c59fa47e4e4fe..be3a9662b468a8096e1679cbd0d2e7641e0ddc8d 100644 (file)
@@ -2,16 +2,16 @@
   <div class="first-step-block">
     <my-global-icon class="upload-icon" iconName="upload"></my-global-icon>
 
-    <div class="button-file">
+    <div class="button-file form-control">
       <span i18n>Select the file to upload</span>
-      <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" />
+      <input #videofileInput type="file" name="videofile" id="videofile" [accept]="videoExtensions" (change)="fileChange()" autofocus />
     </div>
     <span class="button-file-extension">({{ videoExtensions }})</span>
 
     <div class="form-group form-group-channel">
       <label i18n for="first-step-channel">Channel</label>
       <div class="peertube-select-container">
-        <select id="first-step-channel" [(ngModel)]="firstStepChannelId">
+        <select id="first-step-channel" [(ngModel)]="firstStepChannelId" class="form-control">
           <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
         </select>
       </div>
@@ -20,7 +20,7 @@
     <div class="form-group">
       <label i18n for="first-step-privacy">Privacy</label>
       <div class="peertube-select-container">
-        <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId">
+        <select id="first-step-privacy" [(ngModel)]="firstStepPrivacyId" class="form-control">
           <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
           <option i18n [value]="SPECIAL_SCHEDULED_PRIVACY">Scheduled</option>
         </select>
index 3e820041d997e8a5850c3b63379293e8a6837664..9b43d91dad8bb1010dd3000e46bcf6b66957403e 100644 (file)
     <my-remote-subscribe [interact]="true" [uri]="getUri()"></my-remote-subscribe>
   </div>
   <div class="modal-footer inputs">
-    <span i18n class="action-button action-button-cancel" role="button" (click)="hideVisitorModal()">
-      Cancel
-    </span>
+    <input
+      type="button" role="button" i18n-value value="Cancel" class="action-button action-button-cancel"
+      (click)="hideVisitorModal()" (key.enter)="hideVisitorModal()"
+    >
 
     <input
       type="submit" i18n-value value="Login to comment" class="action-button-submit"
index 608a4632b9617569d1a3c8e767e69ebc96f46d6c..935656d23af3532aadefac53151bc15f90cb5646 100644 (file)
@@ -7,6 +7,9 @@
   <div class="modal-body" [innerHTML]="videoHTMLSupport"></div>
 
   <div class="modal-footer inputs">
-    <span i18n class="action-button action-button-cancel" (click)="hide()">Maybe later</span>
+    <input
+      type="button" role="button" i18n-value value="Maybe later" class="action-button action-button-cancel"
+      (click)="hide()" (key.enter)="hide()"
+    >
   </div>
 </ng-template>
index 089a58009e82ece00059f11285e92b9b09ca2e16..c8966d22be0a25dee99ec133611a7d51ddb49c21 100644 (file)
@@ -25,6 +25,7 @@ body {
   // for css custom properties #{$var}
   --mainColor: #{$main-color};
   --mainColorLighter: #{$main-color-lighter};
+  --mainColorLightest: #{$main-color-lightest};
   --mainHoverColor: #{$main-hover-color};
   --mainBackgroundColor: #{$bg-color};
   --mainForegroundColor: #{$fg-color};
@@ -113,6 +114,7 @@ label {
 .main-col {
   margin-left: $menu-width;
   width: calc(100% - #{$menu-width});
+  outline: none;
 
   .margin-content {
     margin-left: $not-expanded-horizontal-margins;
index 297f1f18a6d3542ba03c3b3cd506d131d2f8f344..f0357b579e17660f59f542be0d07e7c7fc0a582e 100644 (file)
@@ -230,3 +230,20 @@ ngb-tooltip-window {
     background-color: var(--secondaryColor);
   }
 }
+
+// input box-shadow on focus
+.form-control {
+  font-size: 15px;
+  color: var(--mainForegroundColor);
+  background-color: var(--inputBackgroundColor);
+  outline: none;
+
+  &:focus-within,
+  &:focus {
+    box-shadow: 0 0 0 .2rem var(--mainColorLightest);
+
+    &.input-error {
+      box-shadow: 0 0 0 .2rem #{scale-color($red, $alpha: -75%)};
+    }
+  }
+}
index f96a43b34387113b78fed75cf2d0799d8d486c60..76e3f3f97f6f0fc69fa0f49efb1bab97454b065a 100644 (file)
   }
 }
 
-@mixin button-focus-visible-shadow($color) {
+@mixin button-focus($color) {
+  &:focus,
   &.focus-visible {
-    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px $color;
+    box-shadow: 0 0 0 .2rem $color;
   }
 }
 
 }
 
 @mixin orange-button {
-  @include button-focus-visible-shadow(var(--mainHoverColor));
+  @include button-focus(var(--mainColorLightest));
 
   &, &:active, &:focus {
     color: #fff;
 }
 
 @mixin tertiary-button {
+  @include button-focus($grey-button-outline-color);
+
   color: $grey-foreground-color;
   background-color: transparent;
 
 }
 
 @mixin grey-button {
+  @include button-focus($grey-button-outline-color);
+
   &, &:active, &:focus {
     background-color: $grey-background-color;
     color: $grey-foreground-color;
 @mixin peertube-select-container ($width) {
   padding: 0;
   margin: 0;
-  border: 1px solid #C6C6C6;
   width: $width;
   border-radius: 3px;
-  overflow: hidden;
   background: var(--inputBackgroundColor);
   position: relative;
   font-size: 15px;
     width: calc(100% + 2px);
     position: relative;
     left: 1px;
-    border: none;
-    box-shadow: none;
+    border: 1px solid #C6C6C6;
     background: transparent none;
     appearance: none;
     cursor: pointer;
   position: absolute;
 
   &:focus + span {
-    box-shadow: 0 0 0 .1rem rgba(87, 85, 217, .2);
+    box-shadow: 0 0 0 .2rem var(--mainColorLightest);
   }
 
   & + span {
     text-align: center;
   }
 }
+
+@mixin ng2-tags {
+  ::ng-deep {
+    .ng2-tag-input {
+      border: none !important;
+    }
+
+    .ng2-tags-container {
+      display: flex;
+      align-items: center;
+      border: 1px solid #C6C6C6;
+      border-radius: 3px;
+      padding: 5px !important;
+      height: max-content;
+
+      &:focus-within {
+        box-shadow: 0 0 0 .2rem var(--mainColorLightest);
+      }
+    }
+
+    tag-input-form {
+      input {
+        height: 30px !important;
+        font-size: 12px !important;
+
+        background-color: var(--mainBackgroundColor) !important;
+        color: var(--mainForegroundColor) !important;
+      }
+    }
+
+    tag {
+      background-color: $grey-background-color !important;
+      color: #000 !important;
+      border-radius: 3px !important;
+      font-size: 12px !important;
+      height: 30px !important;
+      line-height: 30px !important;
+      margin: 0 5px 0 0 !important;
+      cursor: default !important;
+      padding: 0 8px 0 10px !important;
+
+      div {
+        height: 100% !important;
+      }
+    }
+
+    delete-icon {
+      cursor: pointer !important;
+      height: auto !important;
+      vertical-align: middle !important;
+      padding-left: 6px !important;
+
+      svg {
+        position: relative;
+        top: -1px;
+        height: auto !important;
+        vertical-align: middle !important;
+
+        path  {
+          fill: $grey-foreground-color !important;
+        }
+      }
+
+      &:hover {
+        transform: none !important;
+      }
+    }
+  }
+}
index 3c9fa59398b6d58ceaf02af8fd8937575cf66e1c..d0f1a36301fe0a7f54199dfa1772c1a6adb527cc 100644 (file)
@@ -12,11 +12,13 @@ $grey-background-color: #E5E5E5;
 $grey-background-hover-color: #EFEFEF;
 $grey-foreground-color: #585858;
 $grey-foreground-hover-color: #303030;
+$grey-button-outline-color: scale-color($grey-foreground-color, $alpha: -95%);
 
 // Palette
 $main-color: hsl(24, 90%, 50%);
 $main-hover-color: lighten($main-color, 5%);
 $main-color-lighter: lighten($main-color, 10%);
+$main-color-lightest: lighten($main-color, 40%);
 $secondary-color: hsl(187, 77, 34);
 //
 
@@ -77,6 +79,7 @@ $activated-action-button-color: black;
 $variables: (
   --mainColor: var(--mainColor),
   --mainColorLighter: var(--mainColorLighter),
+  --mainColorLightest: var(--mainColorLightest),
   --mainHoverColor: var(--mainHoverColor),
   --mainBackgroundColor: var(--mainBackgroundColor),
   --mainForegroundColor: var(--mainForegroundColor),