Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: Update onebox and add styling for githubfolder onebox (#11313)

jbrw416f984c5ef0
diff --git a/Gemfile.lock b/Gemfile.lock
index dd2bdea874e..4a7ff16177b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -235,7 +235,7 @@ GEM
omniauth-twitter (1.4.0)
omniauth-oauth (~> 1.1)
rack
- onebox (2.1.6)
+ onebox (2.1.7)
addressable (~> 2.7.0)
htmlentities (~> 4.3)
multi_json (~> 1.11)
diff --git a/app/assets/stylesheets/common/base/onebox.scss b/app/assets/stylesheets/common/base/onebox.scss
index 18362a3fed2..07dbe586770 100644
--- a/app/assets/stylesheets/common/base/onebox.scss
+++ b/app/assets/stylesheets/common/base/onebox.scss
@@ -118,6 +118,7 @@ aside.onebox {
@include onebox-favicon("githubcommit", "github");
@include onebox-favicon("githubpullrequest", "github");
@include onebox-favicon("githubissue", "github");
+ @include onebox-favicon("githubfile", "github");
@include onebox-favicon("githubgist", "github");
@include onebox-favicon("amazon", "amazon");
@include onebox-favicon("instagram", "instagram");
@@ -661,7 +662,8 @@ aside.onebox.stackexchange .onebox-body {
.onebox {
&.allowlistedgeneric,
&.whitelistedgeneric,
- &.gfycat {
+ &.gfycat,
+ &.githubfolder {
.site-icon {
width: 16px;
height: 16px;
@@ -692,6 +694,20 @@ aside.onebox.stackexchange .onebox-body {
}
}
+.onebox.githubfolder {
+ .thumbnail {
+ width: 60px;
+ height: 60px;
+ &.onebox-full-image {
+ max-height: 60px;
+ max-width: 60px;
+ }
+ }
+ .label1 {
+ color: var(--primary-med-or-secondary-med);
+ }
+}
+
.onebox.githubcommit {
pre.message {
padding: 0;